Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-595.cs
1 using System;
2
3 public struct SymbolId
4 {
5 }
6
7 public interface IAttributesCollection
8 {
9         object this [SymbolId name] { get; set; }
10 }
11
12 class AttributesCollection : IAttributesCollection
13 {
14         public object this [SymbolId name] { 
15                 get { return null; } 
16                 set { }
17         }
18 }
19
20 class Program
21 {
22         public static object SetDictionaryValue (object self, SymbolId name, object value)
23         {
24                 IAttributesCollection dict = new AttributesCollection ();
25                 return dict [name] = value;
26         }
27
28         public static void Main ()
29         {
30                 SetDictionaryValue (null, new SymbolId (), 1);
31         }
32 }