Vala does not warn about reusage of identifier "type" in GObject constructor
Submitted by luk..@..bi.net
Link to original bug (#772995)
Description
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
See also
Edited by Corentin Noël