That looks like a bug in your code.  If it was allowed before, I wonder what 
was put into the o instance.

anything between {} has to be evaluated at compile time, I think that rule has 
been in force for a long time.

The code should be:

Foo o = Foo(getInstance());

-Steve



----- Original Message ----
> From: Moritz Warning <[email protected]>
> To: [email protected]
> Sent: Fri, January 29, 2010 7:41:11 AM
> Subject: [dmd-beta] dmd1beta test
> 
> I've successfully compiled Tango with dmd1beta.
> 
> But one of my apps don't compile anymore.
> Is it a bug?:
> 
> uint* getInstance() {
>     return new uint;
> }
> 
> struct Foo {
>     uint* x;
> }
> 
> void main(char[][] args){
>     Foo o = {getInstance()};
> }
> /*
> main.d(226): Error: Cannot interpret new uint at compile time
> main.d(236): Error: cannot evaluate getInstance() at compile time
> */
> 
> -- 
> Moritz Warning 
> _______________________________________________
> dmd-beta mailing list
> [email protected]
> http://lists.puremagic.com/mailman/listinfo/dmd-beta



      
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to