Bug 6582 – alias this forward reference error

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-08-30T18:15:00Z
Last change time
2013-02-05T07:41:59Z
Keywords
rejects-valid
Assigned to
nobody
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2011-08-30T18:15:19Z
Happens with both 2.054 stock and Git head: static struct Impl { File file_; } struct File { struct ByChunkAsync { RefCounted!(Impl) impl_; } } struct Tuple(Specs...) { Specs field; alias field this; } struct RefCounted(T) { Tuple!(T, size_t) * _store; } test9.d(17): Error: alias this there can be only one alias this test9.d(15): Error: struct test9.Tuple!(Impl,uint).Tuple has forward references test9.d(10): Error: template instance test9.RefCounted!(Impl) error instantiating test9.d(17): Error: alias this there can be only one alias this
Comment #1 by maximzms — 2013-02-05T07:41:59Z
Doesn't happen with 2.061 or current Git head.