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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4917 - Symbol conflict error message refers to aliased symbol instead of the alias
Summary: Symbol conflict error message refers to aliased symbol instead of the alias
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic
Depends on:
Blocks:
Reported: 2010年09月22日 23:00 UTC by nfxjfg
Modified: 2020年06月25日 02:33 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description nfxjfg 2010年09月22日 23:00:04 UTC
$ 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.


AltStyle によって変換されたページ (->オリジナル) /