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

gtest-468.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7e0506bb4d0f0935b27772947ecbdec88490c63 (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 TS
{
	public int? v { 
		get { return (int?) this; }
	}

	public static implicit operator int? (TS s)
	{
		return 5;
	}

	public static implicit operator TS (int? date)
	{
		return null;
	}

	public static int Main ()
	{
		var r = new TS ().v;
		if (r != 5)
			return 1;

		return 0;
	}
}