Bug 4917 – Symbol conflict error message refers to aliased symbol instead of the alias

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
Linux
Creation time
2010-09-22T23:00:04Z
Last change time
2020-06-25T02:33:19Z
Keywords
diagnostic
Assigned to
No Owner
Creator
nfxjfg
See also
https://issues.dlang.org/show_bug.cgi?id=20975

Comments

Comment #0 by nfxjfg — 2010-09-22T23:00:04Z
$ cat aaa.d int x; alias x y; int y; $ dmd aaa.d aaa.d(1): Error: variable aaa.x conflicts with variable aaa.y at aaa.d(3) It should say: aaa.d(2): Error: variable aaa.y conflicts with variable aaa.y at aaa.d(3) dmd resolves the alias to the original symbol when producing the error message, although the alias caused the error (and not the original symbol). Additionally none of the line numbers point to the line causing the error. Think how confusing this could be in larger codebases.
Comment #1 by bugzilla — 2011-04-03T22:51:14Z