[Mono-dev] 1.2.5 object initializers broken by 1.2.5.1?
Marek Safar
marek.safar at seznam.cz
Sat Oct 6 11:35:29 EDT 2007
Hello Antti,
> 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.
>
Please use SVN version of gmcs it contains significantly improved
support of C# 3.0 and
I was able to compile and run all your code samples. Also there was no
compiler
changes between 1.2.5 and 1.2.5.x
Marek
More information about the Mono-devel-list
mailing list