2010-05-27 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-variance-10.cs
blob730d1461cae251e2a62d9c519d26250a33f363cc
1 // Compiler options: -langversion:future
3 using System;
5 public interface I<out T>
7 int Count{ get; }
10 class Foo {}
12 public class Test : I<string>, I<Foo>
14 int I<string>.Count
16 get { return 1; }
19 int I<Foo>.Count
21 get { return 2; }
25 public static class Program
27 static int Main ()
29 var col = new Test();
31 var test = (I<object>)(object) col;
32 if (test.Count != 1)
33 return 1;
35 return 0;