File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -274,12 +274,14 @@ exprt::operandst java_build_arguments(
274
274
bool named_main=has_suffix (config.main , " .main" );
275
275
const typet &string_array_type=
276
276
java_type_from_string (" [Ljava.lang.String;" );
277
+ // checks whether the function is static and has a single String[] parameter
277
278
bool has_correct_type=
278
279
to_code_type (function.type ).return_type ().id ()==ID_empty &&
279
280
(!to_code_type (function.type ).has_this ()) &&
280
281
parameters.size ()==1 &&
281
282
parameters[0 ].type ().full_eq (string_array_type);
282
- is_main=(named_main && has_correct_type);
283
+ bool public_access = function.type .get (ID_access) == ID_public;
284
+ is_main = named_main && has_correct_type && public_access;
283
285
}
284
286
285
287
// we iterate through all the parameters of the function under test, allocate
You can’t perform that action at this time.
0 commit comments