Thread overview
[Issue 355] New: ICE from enum : nonexistent type
Sep 19, 2006
d-bugmail
Sep 20, 2006
Thomas Kuehne
Sep 30, 2006
d-bugmail
Oct 02, 2006
Thomas Kuehne
Nov 25, 2006
d-bugmail
September 19, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=355

           Summary: ICE from enum : nonexistent type
           Product: D
           Version: 0.167
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: jpelcis@gmail.com


If there is only one element, this will not give the compiler problems.

--------------------

enum foo : type {
        blah1,
        blah2
}

--------------------

dmd -run test
test.d(1): identifier 'type' is not defined
test.d(1): type is used as a type
test.d(1): enum test.foo base type must be of integral type, not void
Assertion failure: '0' on line 160 in file 'enum.c'

abnormal program termination


-- 

September 20, 2006
d-bugmail@puremagic.com schrieb am 2006-09-19:
> http://d.puremagic.com/issues/show_bug.cgi?id=355

> If there is only one element, this will not give the compiler problems.
>
> --------------------
>
> enum foo : type {
>         blah1,
>         blah2
> }
>
> --------------------
>
> dmd -run test
> test.d(1): identifier 'type' is not defined
> test.d(1): type is used as a type
> test.d(1): enum test.foo base type must be of integral type, not void
> Assertion failure: '0' on line 160 in file 'enum.c'
>
> abnormal program termination

Added to DStress as http://dstress.kuehne.cn/nocompile/e/enum_47_A.d http://dstress.kuehne.cn/nocompile/e/enum_47_B.d http://dstress.kuehne.cn/nocompile/e/enum_47_C.d http://dstress.kuehne.cn/nocompile/e/enum_47_D.d http://dstress.kuehne.cn/nocompile/e/enum_47_E.d http://dstress.kuehne.cn/nocompile/e/enum_47_F.d http://dstress.kuehne.cn/nocompile/e/enum_47_G.d http://dstress.kuehne.cn/nocompile/e/enum_47_H.d http://dstress.kuehne.cn/nocompile/e/enum_47_I.d http://dstress.kuehne.cn/nocompile/e/enum_47_J.d http://dstress.kuehne.cn/nocompile/e/enum_47_K.d

Thomas

September 30, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=355





------- Comment #2 from deewiant@gmail.com  2006-09-30 09:44 -------
Also happens if the base type is void:

enum foo : void { a, b }


-- 

October 02, 2006
d-bugmail@puremagic.com schrieb am 2006-09-30:
> http://d.puremagic.com/issues/show_bug.cgi?id=355

> ------- Comment #2 from deewiant@gmail.com  2006-09-30 09:44 -------
> Also happens if the base type is void:
>
> enum foo : void { a, b }

Added to DStress as http://dstress.kuehne.cn/nocompile/e/enum_47_L.d

Thomas


November 25, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=355


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #4 from bugzilla@digitalmars.com  2006-11-25 03:49 -------
Fixed DMD 0.175


--