[Issue 4917] New: Symbol conflict error message refers to aliased symbol instead of the alias

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 22 23:00:44 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4917

           Summary: Symbol conflict error message refers to aliased symbol
                    instead of the alias
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: nfxjfg at gmail.com


--- Comment #0 from nfxjfg at gmail.com 2010-09-22 23:00:04 PDT ---
$ 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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list