projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2010-05-27 Marek Safar <marek.safar@gmail.com>
[mono.git]
/
mcs
/
tests
/
gtest-variance-10.cs
1
// Compiler options: -langversion:future
2
3
using System;
4
5
public interface I<out T>
6
{
7
int Count{ get; }
8
}
9
10
class Foo {}
11
12
public class Test : I<string>, I<Foo>
13
{
14
int I<string>.Count
15
{
16
get { return 1; }
17
}
18
19
int I<Foo>.Count
20
{
21
get { return 2; }
22
}
23
}
24
25
public static class Program
26
{
27
static int Main ()
28
{
29
var col = new Test();
30
31
var test = (I<object>)(object) col;
32
if (test.Count != 1)
33
return 1;
34
35
return 0;
36
}
37
}