Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-452.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8eafd9469f76d8036ead29c5c8cb7a1bf7874289 (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
using System;

public class Test
{
	public static int Main ()
	{
		S mc = new S ();
		float? f = mc;
		if (f != 5)
			return 1;
		
		return 0;
	}
}

struct S
{
	public static implicit operator float (S p1)
	{
		throw new ApplicationException ("should not be called");
	}
	
	public static implicit operator float? (S p1)
	{
		return 5;
	}
}