Fixes https://gitlab.gnome.org/GNOME/vala/issues/1341
semantic/method-virtual-body.test \
semantic/methodcall-field-initializer-throws.test \
semantic/methodcall-invalid-argument-lambda.test \
+ semantic/methodcall-invocation-invalid.test \
semantic/methodcall-void-expression.test \
semantic/methodcall-yield-with-begin.test \
semantic/objectcreation-abstract-class.test \
--- /dev/null
+Invalid Code
+
+interface Bar {
+}
+
+class Foo {
+ public Bar bar { get; set; }
+}
+
+void main() {
+ var foo = new Foo ();
+ print ("%d", foo.bar ());
+}
if (!(m.coroutine && !is_yield_expression && ((MemberAccess) call).member_name != "end")) {
m.get_error_types (collection, source_reference);
}
- } else if (mtype is ObjectType) {
+ } else if (mtype is ObjectType && mtype.type_symbol is Class) {
// constructor
unowned Class cl = (Class) ((ObjectType) mtype).type_symbol;
unowned Method m = cl.default_construction_method;