www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8825] New: Wrong line number of error message

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8825

           Summary: Wrong line number of error message
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: youxkei gmail.com



---
Code:

template t(alias a){
    alias int t;
}

void main(){
    t!(foo // line 6





    ) i; // line 12
    return;
}

Compilation output:

main.d(12): Error: undefined identifier foo


The line number of the error message is wrong.
It is 12, but should be 6.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 15 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8825


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/2492

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 21 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8825




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/3ad9c76c0d553b20f417f166ee9e35cc1d7994ee
fix Issue 8825 - Wrong line number of error message

- Each tokens should have its own 'loc'.
- Rename `Lexer::loc` to `scanloc` to avoid misuse of lookahead-loc.

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