Bug 12196 – Bad error message for multiple declarations

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-18T13:27:00Z
Last change time
2017-07-10T23:10:15Z
Keywords
diagnostic
Assigned to
nobody
Creator
bearophile_hugs
See also
https://d.puremagic.com/issues/show_bug.cgi?id=5807

Comments

Comment #0 by bearophile_hugs — 2014-02-18T13:27:09Z
void main() { enum N = 10; int a[N], b[N]; } DMD 2.065rc1 gives: test.d(3,19): Error: multiple declarations must have the same type, not int[N] and int[N] I suggest to generate a more truthful error message.
Comment #1 by andrej.mitrovich — 2014-02-19T06:34:10Z
I'm pretty sure I saw this filed somewhere already. Can't find it now, although Issue 5807 is related.
Comment #2 by dlang-bugzilla — 2017-07-05T18:56:39Z
Fixed by https://github.com/dlang/dmd/pull/4021. Now it prints: test.d(3): Deprecation: instead of C-style syntax, use D-style syntax 'int[N] a' test.d(3): Deprecation: instead of C-style syntax, use D-style syntax 'int[N] b'
Comment #3 by dlang-bugzilla — 2017-07-10T23:10:15Z
*** This issue has been marked as a duplicate of issue 953 ***