New tests.
[mono.git] / mcs / tests / gen-124.cs
1 using System;
2 using System.Collections.Generic;
3
4 interface IFoo <T>
5 {
6         T this [int index] {
7                 get; set;
8         }
9 }
10
11 public class FooCollection <T> : IFoo <T>
12 {
13         T IFoo<T>.this [int index] {
14                 get {
15                         return default(T);
16                 }
17                 set {
18                 }
19         }
20 }
21
22 class X
23 {
24         static void Main ()
25         {
26                 IFoo<int> foo = new FooCollection<int> ();
27                 int a = foo [3];
28                 Console.WriteLine (a);
29         }
30 }