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-212.cs
blob
d8ba07d4b061a018dbd8fce062556fdc728559f0
1
public interface
SomeInterface
2
{
3
bool
Valid { get; }
4
}
5
6
public struct
SomeStruct
:
SomeInterface
7
{
8
public bool
Valid
{
9
get
{
10
return false
;
11
}
12
}
13
}
14
15
public class
Test
16
{
17
public static void
Fun
<
T
>(
T t
)
where T
:
SomeInterface
{
18
bool
a
=
t
.
Valid
;
19
}
20
21
static void
Main
()
22
{
23
Fun
(
new
SomeStruct
());
24
}
25
}