var init = rc.CurrentInitializerVariable;
var type = init.Type;
+ if (type.IsArray) {
+ target = new ArrayAccess (new ElementAccess (init, args, loc), loc);
+ return true;
+ }
+
var indexers = MemberCache.FindMembers (type, MemberCache.IndexerNameAlias, false);
if (indexers == null && type.BuiltinType != BuiltinTypeSpec.Type.Dynamic) {
ElementAccess.Error_CannotApplyIndexing (rc, type, loc);
--- /dev/null
+using System;
+
+class C
+{
+ int[,] a = new int [2, 3];
+
+ static int Main ()
+ {
+ var res = new C { a = { [1, 1] = 11, [0, 2] = 2} };
+ if (res.a [1, 1] != 11)
+ return 1;
+
+ if (res.a [1, 2] != 0)
+ return 2;
+
+ if (res.a [0, 2] != 2)
+ return 3;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+}
\ No newline at end of file
</method>\r
</type>\r
</test>\r
+ <test name="test-dictinit-03.cs">\r
+ <type name="C">\r
+ <method name="Int32 Main()" attrs="145">\r
+ <size>135</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>20</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="test-ex-filter-01.cs">\r
<type name="X">\r
<method name="Int32 Main()" attrs="150">\r