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

test-440.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d8fe33765c3b22d2072a065abf3c301d5073780a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class A {
	public static implicit operator double (A a)
	{
		return 0.5;
	}

	// unlike CS0034 case, two or more implicit conversion on other 
	// than string is still valid.
	public static implicit operator int (A a)
	{
		return 0;
	}

	public static void Main ()
	{
		A a = new A ();
		object p = a + a;
	}
}