Bug 5861 – Wrong filename in error message when an invalid delegate in a template parameter is typeof()-ed
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-04-19T12:10:00Z
Last change time
2011-06-11T14:21:10Z
Keywords
diagnostic, patch
Assigned to
nobody
Creator
kennytm
Comments
Comment #0 by kennytm — 2011-04-19T12:10:41Z
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.