Thread overview | |||||
---|---|---|---|---|---|
|
April 09, 2005 mixin forward reference error (array) | ||||
---|---|---|---|---|
| ||||
template Foo(alias x) { } struct Bar { mixin Foo!(x); int[] x; } void main() { } DMD 0.120.2 output: mixinfr.d(7): mixin mixinfr.Bar.Foo!(x) forward reference of x If make 'x' type just 'int' or move 'x' declaration before mixin, error disappears. |
April 11, 2005 Re: mixin forward reference error (array) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Zaitseff | -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ilya Zaitseff schrieb am Sun, 10 Apr 2005 00:56:13 +1100: > template Foo(alias x) > { > } > > struct Bar > { > mixin Foo!(x); > int[] x; > } > > void main() > { > } > > DMD 0.120.2 output: > > mixinfr.d(7): mixin mixinfr.Bar.Foo!(x) forward reference of x Known problem: http://dstress.kuehne.cn/run/mixin_07.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCWfTh3w+/yD4P9tIRAtArAJ4vkTs7ZLYyoWbnOsgBn6TRQs19RQCgqsbx IljwYyyUlEogOLq+bkM3jPU= =QLpG -----END PGP SIGNATURE----- |
April 11, 2005 Re: mixin forward reference error (array) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Zaitseff Attachments: | Ilya Zaitseff wrote: | template Foo(alias x) | { | } | | struct Bar | { | mixin Foo!(x); | int[] x; | } | | void main() | { | } | | DMD 0.120.2 output: | | mixinfr.d(7): mixin mixinfr.Bar.Foo!(x) forward reference of x | | If make 'x' type just 'int' or move 'x' declaration before mixin, | error disappears. Known (http://dstress.kuehne.cn/run/mixin_07.d) Thomas |
Copyright © 1999-2021 by the D Language Foundation