GNOME Bugzilla – Bug 788964
Property named "last" causes C compilation to fail
Last modified: 2017-10-26 06:17:29 UTC
Hi, if a class property last is defined the c compilation fails for classes derived from GLIB.Object used vala version: Vala 0.38.2 public class Foo : Object { public string last { get; set; } public static int main(string[] args) { return 0; } } $ valac foo.vala foo.vala.c:24:2: Fehler: Redeklaration von Aufzählung »FOO_LAST_PROPERTY« FOO_LAST_PROPERTY ^~~~~~~~~~~~~~~~~ foo.vala.c:23:2: Anmerkung: Vorherige Definition von »FOO_LAST_PROPERTY« war hier FOO_LAST_PROPERTY, ^~~~~~~~~~~~~~~~~ error: cc exited with status 256 the part in the created c file: typedef struct _FooPrivate FooPrivate; enum { FOO_DUMMY_PROPERTY, FOO_LAST_PROPERTY, FOO_LAST_PROPERTY };
Created attachment 362248 [details] [review] codegen: Avoid possible conflicts with internal property/signal defines
Attachment 362248 [details] pushed as 2a481c3 - codegen: Avoid possible conflicts with internal property/signal defines