Bug 2926 – bug in alias this with mutually recursive structs

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2009-05-02T21:41:00Z
Last change time
2012-02-20T03:24:40Z
Keywords
rejects-valid
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2009-05-02T21:41:52Z
struct A(T) { B!T fun() { return B!T.init; } } struct B(T) { private A!T _s; alias _s this; } void main() { A!(int) s; } ./test.d(15): Error: alias this there can be only one alias this ./test.d(6): Error: template instance test.B!(int) error instantiating ./test.d(15): Error: alias this there can be only one alias this
Comment #1 by yebblies — 2012-02-20T03:24:40Z
This seems to work in dmd 2.058