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

test-439.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 85c349c9eff5e15a1ecfd6e6dc3e73715c1a68ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
public struct LayerMask
{
	private ushort mask;
	public static implicit operator int (LayerMask mask) { return (int)mask.mask; }
	public static implicit operator LayerMask (int intVal) 
	{ 
		LayerMask mask;
		mask.mask = unchecked ((ushort)intVal);
		return mask;
	}
}

class Test
{
	static private LayerMask test;
	static public void Main ()
	{
		LayerMask a = ~test;
		if (a != 0xFFFF) // LayerMask is an ushort internally
			throw new Exception ("");
	}
}