GNOME Bugzilla – Bug 697342
possible to "chain-up" to non-base classes
Last modified: 2018-05-22 14:45:16 UTC
It is possible to chain up to a class that is not listed as base class: public class Foo { public Foo.foo () {} } public class Bar { public Bar () { Foo.foo (); // chain up } } void main() { } The generated construction code: Bar* bar_construct (GType object_type) { Bar* self = NULL; self = (Bar*) foo_construct_foo (object_type); return self; }
With Vala master your sample is rejected with: yo.vala:7.3-7.12: error: use `new' operator to create new objects Foo.foo (); // chain up ^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s) Is that sufficient or could come up with another test case for this problem?
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/371.