www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12063] New: [ICE](interpret.c line 310) With enum of structs


           Summary: [ICE](interpret.c line 310) With enum of structs
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2014-02-02 08:58:29 PST ---
struct Foo {}
enum Bar : Foo {
    a = Foo(),
void main() {}

dmd 2.065.0b2 gives me an error message witn no line number about "max", that
is not present in the program, plus this, plus a crash:

Error: no property 'max' for type 'Foo'
test.d(4): Error: incompatible types for ((Foo()) + (1)): 'Bar' and 'int'
Assertion failure: '0' on line 310 in file 'interpret.c'

Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2014