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
2010-04-13 Sebastien Pouliot <sebastien@ximian.com>
[mono-project.git]
/
mcs
/
tests
/
test-211.cs
blob
81eecb75f647f862e5bbcd19e8b990c59811c80e
1
class
X
2
{
3
public readonly int value
;
4
5
public
X
(
int value
)
6
{
7
this
.
value
=
value
;
8
}
9
10
public static implicit operator
X
(
int
y
)
11
{
12
return new
X
(
y
);
13
}
14
}
15
16
class
Y
17
{
18
public readonly
X x
;
19
20
public
Y
(
X x
)
21
{
22
this
.
x
=
x
;
23
}
24
25
public static implicit operator
Y
(
X x
)
26
{
27
return new
Y
(
x
);
28
}
29
}
30
31
class
Z
32
{
33
public readonly
Y y
;
34
35
public
Z
(
Y y
)
36
{
37
this
.
y
=
y
;
38
}
39
40
public static implicit operator
Z
(
Y y
)
41
{
42
return new
Z
(
y
);
43
}
44
45
public static int
Main
()
46
{
47
int
a
=
5
;
48
Y y
= (
Y
) (
X
)
a
;
49
50
//.
51
// Compile this:
52
//
53
54
int
b
= (
System
.
Int32
)
int
.
Parse
(
"1"
);
55
return
0
;
56
}
57
}