summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0019-59.cs
blob: 72a7a202e309b91cf3af6b2076f75aaf7d86b589 (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
// CS0019: Operator `^' cannot be applied to operands of type `S2' and `float'
// Line: 9

public class Test
{
	public static void Main()
	{
		S2 s2 = new S2 ();
		int r = s2 ^ 5.04f;
	}
}

struct S2
{
	public static int operator ^ (double? p1, S2 s2)
	{
		return 1;
	}
	
	public static implicit operator int? (S2 s1)
	{ 
		return int.MinValue;
	}
}