[Issue 6265] New: Pure-inference doesn't apply with template alias parameter of function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 7 10:29:47 PDT 2011
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: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 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: -------
More information about the Digitalmars-d-bugs
mailing list