digitalmars.D.bugs - [Issue 6107] New: ICE when a non-template member named '__ctor' exists in a struct, and the constructor is attempted to be invoked.
- d-bugmail puremagic.com Jun 05 2011
- d-bugmail puremagic.com Jan 20 2012
- d-bugmail puremagic.com Jan 10 2013
http://d.puremagic.com/issues/show_bug.cgi?id=6107 Summary: ICE when a non-template member named '__ctor' exists in a struct, and the constructor is attempted to be invoked. Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: kennytm gmail.com --- Comment #0 from kennytm gmail.com 2011-06-05 00:52:47 PDT --- Test case: ---------------------------------- struct Foo { enum __ctor = 4; // can also be a function, struct, alias, but template is ok. } void main() { auto f = Foo("irrelevant"); // can also use 'new Foo(...)' } ---------------------------------- Assertion failed: (td), function semantic, file expression.c, line 7040. Abort trap ---------------------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 05 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6107 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com Severity|normal |trivial --- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-01-20 22:38:15 PST --- Names beginning with a double underscore are reserved for the compiler's use. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 20 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6107 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com --- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-01-10 07:14:02 PST --- (In reply to comment #1)Names beginning with a double underscore are reserved for the compiler's use.
Should we implement some kind of identifier checks in the front-end? We could gather all double-underscore symbols the compiler uses and just compare them when instantiating Identifier from user-code. Unless the compiler also generates these symbols with random names, in such a case we would have to ban all double-underscores identifiers in user-code because they might potentially clash. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 10 2013









d-bugmail puremagic.com 