GNOME Bugzilla – Bug 646489
Naming a method get_type() results in invalid C code
Last modified: 2018-05-22 13:59:35 UTC
In Vala 0.11.7, create a method named get_type(), for example: public int get_type() { return 0; } The C compiler will spit out a bunch of errors on compilation, because Vala has generated two functions of the same name. In this case, one will return an integer and the other will return a GType.
Yes, this is a part of a general problem with the potential non-uniqueness of generated identifiers. See also bug 472259 and bug 790239.
-- 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/188.