repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[mono/tests] Fix out of tree build.
[mono-project.git]
/
mcs
/
tests
/
gtest-577.cs
blob
786eead37ea9766d198326af56fee11f26b57dda
1
using
System
;
2
3
static class
Program
4
{
5
public interface
I1
6
{
7
string
Id { get; }
8
}
9
10
public class
BaseClass
11
{
12
public int
Id
{
13
get
{
14
return
4
;
15
}
16
}
17
}
18
19
public class
Derived
:
BaseClass
,
I1
20
{
21
public new string
Id
{
22
get
{
23
return
"aa"
;
24
}
25
}
26
}
27
28
static void
Generic
<
T
> (
T item
)
where T
:
BaseClass
,
I1
29
{
30
if
(
item
.
Id
!=
4
)
31
throw new
Exception
(
"Doom!"
);
32
}
33
34
static void
Main
()
35
{
36
Generic
(
new
Derived
());
37
}
38
}