Bug 9796 – "too many initializers" error message doesn't give correct line number

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-23T10:09:00Z
Last change time
2013-11-22T08:08:07Z
Assigned to
nobody
Creator
kodlists-dlang

Comments

Comment #0 by kodlists-dlang — 2013-03-23T10:09:15Z
$ cat too_many_inits.d struct Foo { string a, b; } static Foo foo[] = [ { "test1", "test2", "test3", }, { "test1", "test2", }, ]; $ dmd -c too_many_inits.d too_many_inits.d(5): Error: too many initializers for Foo The error is in line 3 and not in line 5 as reported by the compiler.
Comment #1 by yebblies — 2013-11-22T08:08:07Z
Now has line number: testx.d(3): Error: too many initializers for Foo