[Bug 145] New: Can't refer to global scope after a cast
Thomas Kuehne
thomas-dloop at kuehne.cn
Fri May 19 09:44:56 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-05-18:
> #int somefunc(int i) { return i; }
> #class someclass{
> #// int somefunc() {...}
> # uint otherfunc(){
> # return cast(uint).somefunc(2);
> # }
> #}
>
> C:\dmd>dmd test.d
> test.d(5): found '(' when expecting ';' following 'return statement'
> test.d(5): found ')' when expecting ';' following 'statement'
>
> C:\dmd>dmd
> Digital Mars D Compiler v0.157
>
> If ".somefunc" were in a module, "cast(uint)somemod.somefunc" works just fine.
Added to DStress as
http://dstress.kuehne.cn/run/o/opModule_01_A.d
http://dstress.kuehne.cn/run/o/opModule_01_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFEbb843w+/yD4P9tIRAn6+AJ0eoNXdbxvYEmPOxlG7u78F5HBg/QCeN/ii
omyrnfG0dfw94VVCgIEPp2w=
=h6St
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list