Skip to content

Commit 42c079d

Browse files
Use existing function for checking object is array
1 parent 465e5dc commit 42c079d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/goto-programs/builtin_functions.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Author: Daniel Kroening, [email protected]
3131

3232
#include <util/c_types.h>
3333
#include <ansi-c/string_constant.h>
34+
#include <java_bytecode/java_types.h>
3435

3536
#include "format_strings.h"
3637

@@ -627,7 +628,7 @@ void goto_convertt::do_java_new_array(
627628
t_n->source_location=location;
628629

629630
const struct_typet &struct_type=to_struct_type(ns.follow(object_type));
630-
PRECONDITION(struct_type.components().size() == 3);
631+
PRECONDITION(is_valid_java_array(struct_type));
631632

632633
// Init base class:
633634
dereference_exprt deref(lhs, object_type);

0 commit comments

Comments
 (0)