formal_target_type is expected to be set when inferring generic type
parameters.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/835
methods/bug784691.vala \
methods/bug791215.vala \
methods/bug791283.vala \
+ methods/argument-array-initilizer.vala \
methods/generics.vala \
methods/printf-invalid.test \
methods/printf-constructor.vala \
--- /dev/null
+class Foo : Object {
+}
+
+G get_object<G> (Object[] o) {
+ return null;
+}
+
+Foo get_foo () {
+ return get_object ({ new Foo () });
+}
+
+void main() {
+ get_foo ();
+}
var array_creation = new ArrayCreationExpression (array_type.element_type.copy (), array_type.rank, this, source_reference);
array_creation.length_type = array_type.length_type.copy ();
array_creation.target_type = target_type;
+ array_creation.formal_target_type = formal_target_type;
old_parent_node.replace_expression (this, array_creation);
checked = false;