Bug 6978 – Mixin behavior order dependent

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2011-11-20T06:05:00Z
Last change time
2014-03-19T22:00:15Z
Assigned to
nobody
Creator
Norbert

Attachments

IDFilenameSummaryContent-TypeSize
1046bug_mixin_order.dThe file failing to compile...text/x-dsrc393

Comments

Comment #0 by Norbert — 2011-11-20T06:05:51Z
The attached file fails to compile with the message: ./bug_mixin_order.d(6): Error: forward reference of variable rank ./bug_mixin_order.d(10): Error: mixin bug_mixin_order.MyArray!(int,4).MyArray.verifyArray!() error instantiating ./bug_mixin_order.d(20): Error: template instance bug_mixin_order.MyArray!(int,4) error instantiating ------------ Strangely, the assertion fails only if it is forward referencing *and* inside a mixin. Either situation on its own works fine.
Comment #1 by Norbert — 2011-11-20T06:07:03Z
Created attachment 1046 The file failing to compile...
Comment #2 by lt.infiltrator — 2014-03-19T22:00:15Z
The provided code compiles as of v2.065.