[Issue 5160] New: Overzealous recursive template expansion protection.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 3 14:55:17 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5160
Summary: Overzealous recursive template expansion protection.
Product: D
Version: D2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: gareth.tpc at gmail.com
--- Comment #0 from Gareth Charnock <gareth.tpc at gmail.com> 2010-11-03 14:54:17 PDT ---
The following will not compile even though templateFunc is not automatically
instantiated with A (there is no actual danger of a stack overflow).
struct A(T1) {
void templateFunc(T2)(T2 a) {
alias A!(typeof(this)) error;
}
}
void main() {
A!int a;
a.templateFunc!int(0);
}
Error: recursive template expansion for template argument A!(int)
--
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