summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0019-55.cs
blob: 18163fa1f0592b5895f73b3fa4d5dc962a3a3801 (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
// CS0019: Operator `==' cannot be applied to operands of type `A' and `int?'
// Line: 22

class A
{
	public static bool operator == (A a, int b)
	{
		return false;
	}
	
	public static bool operator != (A a, int b)
	{
		return false;
	}
}

class C
{
	public static void Main ()
	{
		A a = new A ();
		object b = a == Id;
	}
	
	static int? Id {
		get { return 1; }
	}
}