D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6978 - Mixin behavior order dependent
Summary: Mixin behavior order dependent
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-20 06:05 UTC by Norbert Nemec
Modified: 2014-03-19 22:00 UTC (History)
1 user (show)

See Also:


Attachments
The file failing to compile... (393 bytes, text/x-dsrc)
2011-11-20 06:07 UTC, Norbert Nemec
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Norbert Nemec 2011-11-20 06:05:51 UTC
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 Norbert Nemec 2011-11-20 06:07:03 UTC
Created attachment 1046 [details]
The file failing to compile...
Comment 2 Infiltrator 2014-03-19 22:00:15 UTC
The provided code compiles as of v2.065.