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

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

public class A<T>
{
	T value;

	public A (T value)
	{
		this.value = value;
	}

	public static explicit operator T (A<T> source)
	{
		return source.value;
	}
}

public class Test
{
	public static int Main ()
	{
		var source = new A<int?> (3);
		if (N ((int)source) != 3)
			return 1;

		return 0;
	}

	static int N (int value)
	{
		return value;
	}
}