After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646489 - Naming a method get_type() results in invalid C code
Naming a method get_type() results in invalid C code
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-01 22:00 UTC by Eric Gregory
Modified: 2018-05-22 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric Gregory 2011-04-01 22:00:15 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.
Comment 1 Michael 'Mickey' Lauer 2018-02-21 11:39:04 UTC
Yes, this is a part of a general problem with the potential non-uniqueness of generated identifiers.

See also bug 472259 and bug 790239.
Comment 2 GNOME Infrastructure Team 2018-05-22 13:59:35 UTC
-- 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.