Updated with review feedback.
[mono.git] / mcs / tests / gtest-variance-17.cs
1 using System;
2
3 interface InterfaceContravariat<in T>
4 {
5         T Prop { set; }
6         T this[int arg] { set; }
7 }
8
9 interface InterfaceCovariant<out T>
10 {
11         T Prop { get; }
12         T this[int arg] { get; }
13 }
14
15 class A : InterfaceContravariat<int>, InterfaceCovariant<long>
16 {
17         public static int Main ()
18         {
19                 return 0;
20         }
21
22         int InterfaceContravariat<int>.Prop
23         {
24                 set { throw new NotImplementedException (); }
25         }
26
27         int InterfaceContravariat<int>.this[int arg]
28         {
29                 set { throw new NotImplementedException (); }
30         }
31
32         long InterfaceCovariant<long>.Prop
33         {
34                 get { throw new NotImplementedException (); }
35         }
36
37         long InterfaceCovariant<long>.this[int arg]
38         {
39                 get { throw new NotImplementedException (); }
40         }
41 }