[Issue 6310] New: Missing "template instantiation" traceback when an error happens in the template parameter of an alias.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 14 01:10:31 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6310
Summary: Missing "template instantiation" traceback when an
error happens in the template parameter of an alias.
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-07-14 01:05:17 PDT ---
(I believe there's a duplicate, but I can't find it.)
Test case
--------------------------------------
template RT(alias f) {
alias int RT;
}
template F(T) {
alias RT!(T.dsfsdf) X; // line 5
}
pragma(msg, F!(int)); // line 7
--------------------------------------
x.d(5): Error: no property 'dsfsdf' for type 'int'
--------------------------------------
There should be another error
x.d(7): Error: template instance x.F!(int) error instantiating
Many Phobos template e.g. ForeachType suffer from this missing traceback. The
error doesn't happen in D1, apparently.
--
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