repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add comment
[mcs.git]
/
tests
/
gtest-variance-10.cs
blob
730d1461cae251e2a62d9c519d26250a33f363cc
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
}