[Issue 461] New: Constant not understood to be constant when circular module dependency exists.
Thomas Kuehne
thomas-dloop at kuehne.cn
Wed Nov 8 07:33:27 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-10-26:
> http://d.puremagic.com/issues/show_bug.cgi?id=461
> dmd tmp2.d tmp2b.d
> tmp2b.d(6): Integer constant expression expected instead of SIZE
> tmp2b.d(6): Integer constant expression expected instead of SIZE
>
> ----- tmp2.d -----
>
> private import tmp2b;
>
> const int SIZE = 7;
>
> ----- tmp2b.d -----
>
> private import tmp2;
>
> struct s {
>
> char a[ SIZE ];
>
> }
>
> Workaround:
> Move constant above import of other module.
>
> ----- tmp2.d -----
>
> const int SIZE = 7;
>
> private import tmp2b;
Added to DStress as
http://dstress.kuehne.cn/compile/c/const_40_A.d
http://dstress.kuehne.cn/compile/c/const_40_B.d
http://dstress.kuehne.cn/compile/c/const_40_C.d
http://dstress.kuehne.cn/compile/c/const_40_D.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFUfwbLK5blCcjpWoRAvQeAJ4/cIBgs3KXWqmxmsNNN2lCUhiZIQCgrbm+
nWl9Wy0Jv0MX6ivZkD3TnUk=
=0Vc/
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list