projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Allow passing null to JsonArray.Add()
[mono.git]
/
mcs
/
tests
/
gtest-136.cs
1
using System;
2
3
namespace Martin {
4
public struct A
5
{
6
public readonly long Data;
7
8
public A (long data)
9
{
10
this.Data = data;
11
}
12
13
public static explicit operator B (A a)
14
{
15
return new B ((int) a.Data);
16
}
17
}
18
19
public struct B
20
{
21
public readonly int Data;
22
23
public B (int data)
24
{
25
this.Data = data;
26
}
27
28
public static implicit operator A (B b)
29
{
30
return new A (b.Data);
31
}
32
}
33
34
class X
35
{
36
public static void Main ()
37
{
38
B? b = new B (5);
39
A? a = b;
40
B? c = (B?) a;
41
B? d = (Martin.B?) a;
42
}
43
}
44
}