digitalmars.D.bugs - [Issue 7746] New: Error with 'TOK232' declaring enum of anonymous nested class type
- d-bugmail puremagic.com (21/21) Mar 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7746
- d-bugmail puremagic.com (10/10) Mar 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7746
- d-bugmail puremagic.com (15/15) Sep 16 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7746
http://d.puremagic.com/issues/show_bug.cgi?id=7746 Summary: Error with 'TOK232' declaring enum of anonymous nested class type Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: clugdbug yahoo.com.au enum x = new class { int n = 4; }; static assert(x.n == 4); bug.d(5): Error: static assert (TOK232.n == 4) is not evaluatable at compile time -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7746 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic It probably should generate an error on creation of the enum. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7746 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED In git head, error message is improved. enum x = new class { int n = 4; }; static assert(x.n == 4); test.d(1): Error: variable test.x : Unable to initialize enum with class or pointer to struct. Use static const variable instead. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 16 2013