Bug 6334 – Template is silently not instantiated

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-07-16T02:16:00Z
Last change time
2015-02-18T03:36:51Z
Keywords
accepts-invalid, wrong-code
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2011-07-16T02:16:49Z
This code compiles on dmd 2.054: mixin template T1() { mixin T2; //compiles if these lines mixin T2!(a, bb, ccc, dddd); //are before T2 declaration mixin template T2() { static assert(0); } } void main() { mixin T1; }
Comment #1 by lt.infiltrator — 2014-03-19T20:48:19Z
As of v2.065, the static assert is run, giving: /d910/f663.d(4): Error: static assert (0) is false Is that the expected behaviour?
Comment #2 by k.hara.pg — 2014-03-28T20:49:14Z
(In reply to comment #1) > As of v2.065, the static assert is run, giving: > /d910/f663.d(4): Error: static assert (0) is false > > Is that the expected behaviour? I think it was an order dependent mixin bug, and today it seems to be fixed.
Comment #3 by github-bugzilla — 2014-09-14T21:55:49Z
Comment #4 by github-bugzilla — 2015-02-18T03:36:51Z