GNOME Bugzilla – Bug 772995
Vala does not warn about reusage of identifier "type" in GObject constructor
Last modified: 2018-05-22 15:39:55 UTC
Code to reproduce: class Foo : Object { construct { string type; } } void main () {} Vala does not tell me not to use the variable "type". Instead g++ gives me the error /home/lukas/tmp/type.vala.c:61:9: error: ‘type’ redeclared as different kind of symbol gchar* type = NULL; ^ Which makes sense as "type" is first defined as "GType type" in the function signature: static GObject * foo_constructor (GType type, [...] Cheers
-- 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/560.