https://d.puremagic.com/issues/show_bug.cgi?id=12392
Summary: No attribute inference if first template instantiation
uses `alias`
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2014-03-17
19:08:38 MSK ---
This code should compile:
---
void f(T)() { }
alias fa = f;
void main() nothrow
{ fa!int(); }
---
main.d(5): Error: 'main.fa!int.f' is not nothrow
main.d(4): Error: function 'D main' is nothrow yet may throw
---
Same errors for `@safe` and `pure` attributes.
This is major as the behaviour is completely unexpected as e.g.
`__traits(compiles, fa!int)` before `f!int()` call changes `f`'s signature.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------