# HG changeset patch # User thomask # Date 1148056822 0 # Node ID 7d45295ced76f8a0617b32e3e42fd4b25802a564 # Parent f54eb4740885c9ae8c5396ed109def13bd2fb91a Can't refer to global scope after a cast 2006-05-18 news:bug-145-3@http.d.puremagic.com/bugzilla/ diff -r f54eb4740885 -r 7d45295ced76 run/o/opModule_01_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opModule_01_A.d Fri May 19 16:40:22 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2006-05-18 +// @uri@ news:bug-145-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.o.opModule_01_A; + +float foo(float f){ + return f + 1.0f; +} + +int main(){ + if(cast(int) .foo(2.0f) != 3){ + assert(0); + } + return 0; +} diff -r f54eb4740885 -r 7d45295ced76 run/o/opModule_01_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opModule_01_B.d Fri May 19 16:40:22 2006 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2006-05-18 +// @uri@ news:bug-145-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.o.opModule_01_B; + +float foo(float f){ + return f + 1.0f; +} + +int main(){ + if(cast(int) (.foo(2.0f)) != 3){ + assert(0); + } + return 0; +}