var function = new CCodeFunction (array_contains_func, "gboolean");
function.modifiers = CCodeModifiers.STATIC;
- function.add_parameter (new CCodeParameter ("stack", get_ccode_name (array_type)));
+ function.add_parameter (new CCodeParameter ("stack", "%s*".printf (get_ccode_name (array_type.element_type))));
function.add_parameter (new CCodeParameter ("stack_length", "int"));
if (array_type.element_type is StructValueType) {
function.add_parameter (new CCodeParameter ("needle", get_ccode_name (array_type.element_type) + "*"));
assert (b.length[0] == 5);
}
+void test_inline_array () {
+ const int a[] = { 1, 2, 3 };
+ assert (1 in a);
+}
+
void main () {
test_integer_array ();
test_string_array ();
test_static_array ();
test_reference_transfer ();
test_length_assignment ();
+ test_inline_array ();
}