summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-588.cs
blob: efbc67e5f9194c3d45cde8bc35272e4f51d652d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;

struct S
{
	public static implicit operator short? (S s)
	{
		return 0;
	}

	public static implicit operator short (S s)
	{
		throw new ApplicationException ();
	}
}

class Program
{
	public static int Main ()
	{
		S? s = null;
		S? s2 = new S ();

		long? i = s;
		if (i != null)
			return 1;

		double? ui = s2;
		if (ui == null)
			return 2;

		return 0;
	}
}