Bug 4048 – [CTFE] struct initializer: missing line number in error message

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-04-02T14:34:00Z
Last change time
2015-06-09T05:11:42Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-04-02T14:34:02Z
(Not tested with the latest bug fixes) struct Foo { /*static*/ struct Bar { int x; } Bar b = { x: 1 }; } int spam() { Foo f; return 0; } void main() { enum int _ = spam(); } dmd 2.042 gives (with no line of error): Error: cannot make expression out of initializer for b
Comment #1 by clugdbug — 2011-04-12T00:18:00Z
The rejects-valid aspect of this bug is a duplicate of bug 3792.
Comment #2 by bugzilla — 2011-04-27T20:07:42Z