projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #496 from nicolas-raoul/unit-test-for-issue2907
[mono.git]
/
mcs
/
tests
/
test-722.cs
1
interface IA
2
{
3
}
4
5
interface IF : IA
6
{
7
int Prop { set; }
8
}
9
10
struct S : IF
11
{
12
int prop;
13
14
public S (int a)
15
{
16
this.prop = 5;
17
}
18
19
public int Prop {
20
set {
21
prop = value;
22
}
23
}
24
25
void M<T> (T ia) where T : struct, IA
26
{
27
((IF)ia).Prop = 3;
28
}
29
30
public static void Main ()
31
{
32
S s = new S ();
33
object o = s;
34
((IF)((S)o)).Prop = 3;
35
36
IA ia = new S ();
37
((IF)ia).Prop = 3;
38
}
39
}