Merge pull request #2408 from tastywheattasteslikechicken/MoreInterfaceSupport
[mono.git] / mono / tests / verifier / valid_nested_field_access_with_generic_class.cs
1
2 public class HashSet<T> {
3         Link[] links = new Link[10];
4         Link link = new Link ();
5
6         struct Link {
7                 public int HashCode;
8                 public int Next;
9         }
10
11         struct Enumerator {
12                 HashSet<T> hashset;
13                 public Enumerator (HashSet<T> hashset) {
14                         this.hashset = hashset;
15                 }
16
17                 public void Test () {
18                         int val = hashset.links[0].Next;
19                 }
20
21                 public void Test2 () {
22                         int val = hashset.link.Next;
23                 }
24         }
25
26         public  void Test () {
27                 new Enumerator (this).Test();
28                 new Enumerator (this).Test2();
29         }
30 }
31
32 public class Driver {
33
34         public static void Main () {
35                 new HashSet<int>().Test();
36         }
37 }
38