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

test-641.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6428c92a111d923d77c318219b32df39bdb28fed (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
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;

public class Identifier
{
	public Identifier () { }

	public static bool operator == (Identifier id1, Identifier id2)
	{
		return true;
	}
	public static bool operator != (Identifier id1, Identifier id2)
	{
		return true;
	}

	public static implicit operator Identifier (string identifier)
	{
		return null;
	}
	
	public static implicit operator String (Identifier id)
	{
		return null;
	}
	
	public static implicit operator decimal (Identifier id)
	{
		return -1;
	}	

	public static int Main ()
	{
		Identifier a = null;
		string b = "a";

		if (!(a == b))
			return 1;

		decimal d = 5;
		if (a == d)
			return 2;
		
		return 0;
	}
}