Bug 12063 – No line number error on uninitialized enum member if base type is not incrementable
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-02T08:58:00Z
Last change time
2014-04-10T06:47:42Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2014-02-02T08:58:29Z
struct Foo {}
enum Bar : Foo {
a = Foo(),
b
}
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'
Comment #1 by k.hara.pg — 2014-04-10T02:59:28Z
With git-head, ICE does not occur.
Error: no property 'max' for type 'Foo'
test.d(7): Error: incompatible types for ((Foo()) + (1)): 'Bar' and 'int'
Change the summary and keywords.