[Issue 5861] New: Wrong filename in error message when an invalid delegate in a template parameter is typeof()-ed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 19 12:14:16 PDT 2011


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

           Summary: Wrong filename in error message when an invalid
                    delegate in a template parameter is typeof()-ed
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2011-04-19 12:10:41 PDT ---
Test case:

-----------------------------------------
// x.d
#line 2000 "x.d"
void g(alias f)() {
    typeof(f) z;
}
-----------------------------------------
// y.d
import x;
void main() {
    g!( (UndefinedIdentifier){} )();
}
-----------------------------------------

The error message is:

y.d(2002): Error: variable y.main.g!(__dgliteral1).g.z voids have no value
y.d(3): Error: template instance y.main.g!(__dgliteral1) error instantiating

where the first error should point to x.d(2002) or y.d(3). 

Probably related to issue 5073.

-- 
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