[Issue 11727] [ICE] Returning an enum with no value from a function fails

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 12 09:10:59 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11727



--- Comment #2 from monkeyworks12 at hotmail.com 2013-12-12 09:10:54 PST ---
(In reply to comment #1)
> I get:
> 
> DMD v2.065 DEBUG
> testx.d(4): Error: enum testx.returnEnum.n is forward referenced looking for
> base type
> testx.d(4): Error: enum testx.returnEnum.n is forward referenced looking for
> base type
> testx.d(4): Error: enum testx.returnEnum.n is forward referenced looking for
> base type
> testx.d(11): Error: incompatible types for ((returnEnum()) == (0)): 'n' and
> 'int'
> 
> With the latest compiler.

My mistake, I tested this on Dpaste and must not have set it to Git HEAD.
Still, should this be changed to rejects-valid? It seems to me that n should
default to type int and value 0.

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


More information about the Digitalmars-d-bugs mailing list