http://d.puremagic.com/issues/show_bug.cgi?id=6265
Summary: Pure-inference doesn't apply with template alias
parameter of function
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2011-07-07 10:24:42 PDT ---
Test case:
----------------------
pure int h() {
return 1;
}
int f(alias g)() {
return g();
}
pure int i() {
return f!h();
}
----------------------
x.d(8): Error: pure function 'i' cannot call impure function 'f'
----------------------
The instantiation f!h should be detected as pure, but currently DMD on git
master fails to do so.
nothrow and @safe are correctly inferred.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------