2010-05-31 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / test-439.cs
blob85c349c9eff5e15a1ecfd6e6dc3e73715c1a68ea
1 using System;
2 public struct LayerMask
4 private ushort mask;
5 public static implicit operator int (LayerMask mask) { return (int)mask.mask; }
6 public static implicit operator LayerMask (int intVal)
7 {
8 LayerMask mask;
9 mask.mask = unchecked ((ushort)intVal);
10 return mask;
14 class Test
16 static private LayerMask test;
17 static public void Main ()
19 LayerMask a = ~test;
20 if (a != 0xFFFF) // LayerMask is an ushort internally
21 throw new Exception ("");