class C
{
public S Value {
- set { }
+ set; get;
}
static void Main ()
return null;
if (source is CollectionOrObjectInitializers) {
+ target = target.Resolve (ec);
+ if (target == null)
+ return null;
+
Expression previous = ec.CurrentInitializerVariable;
ec.CurrentInitializerVariable = target;
source = source.Resolve (ec);
eclass = source.eclass;
type = source.Type;
+
return this;
}
return false;
}
- target = new IndexerExpr (indexers, type, init, args, loc).Resolve (rc);
+ target = new IndexerExpr (indexers, type, init, args, loc);
return true;
}
}
--- /dev/null
+using System.Collections.Generic;
+
+class A {
+ public A ()
+ {
+ Info = new Dictionary<string, int>();
+ }
+
+ public Dictionary<string, int> Info { get; set; }
+}
+
+class X
+{
+ public static void Main ()
+ {
+ var x = new A () {
+ Info = {
+ ["x"] = 1,
+ ["y"] = 2
+ }
+ };
+ }
+}
\ No newline at end of file
</method>
</type>
</test>
+ <test name="test-dictinit-05.cs">
+ <type name="A">
+ <method name="System.Collections.Generic.Dictionary`2[System.String,System.Int32] get_Info()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Info(System.Collections.Generic.Dictionary`2[System.String,System.Int32])" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>19</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>44</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-ex-filter-01.cs">
<type name="X">
<method name="Int32 Main()" attrs="150">