http://d.puremagic.com/issues/show_bug.cgi?id=9953
Summary: manifest constants of reference types should be illegal Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2013-04-18 01:43:43 PDT --- --- enum X = [1,2,3]; void main() { assert( X.ptr is X.ptr); assert( X is X ); } --- Both asserts fail at runtime, because they are equivalent to assert( [1,2,3].ptr is [1,2,3].ptr); assert( [1,2,3] is [1,2,3] ); It would be OK for X to be an int[3] array, but not a slice. Fundamentally, a reference enum type doesn't make sense. They can't have an address. This is the root cause of bug 4397. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------