[Mono-dev] 1.2.5 object initializers broken by 1.2.5.1?

Miguel de Icaza miguel at novell.com
Sat Oct 6 11:20:02 EDT 2007


Hello Antti,

    Please file bug reports for these issues.


> Hello.
> 
> It seems that throwing an exception with object initializers has broken. 
> Specifically this code:
> 
>     throw new Foo() {
>         x = 1, y = 2
>     };
> 
> behaves differently from:
> 
>     var foo = new Foo() {
>         x = 1, y = 2;
>     };
>     throw foo;
> 
> It seems that x and y remain with null values.
> 
> Also, initializing a dictionary from a list seems to have broken, as 
> this does not compile:
> 
>     var foo = new Dictionary<string, object>() {
>        { "hip", null },
>        { "hop", null }
>     };
> 
> but this used to compile and work with 1.2.5.
> 



More information about the Mono-devel-list mailing list