summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0019-40.cs
blob: ba4f8e9995849522375d9d6b4b40776ba57d31dd (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
// CS0019: Operator `==' cannot be applied to operands of type `Foo' and `null'
// Line: 14

struct Foo
{
	public static bool operator == (int d1, Foo d2)
	{
		throw new System.ApplicationException ();
	}
		
	public static bool operator != (int d1, Foo d2)
	{
		throw new System.ApplicationException ();	
	}
}

public class Test
{
	static Foo ctx;

	public static void Main ()
	{
		if (ctx == null)
			return;
	}
}