In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
[mcs.git] / tests / test-560.cs
blob1dfb911e7d65ad25bacd4f0242781b691283da00
1 using System;
3 namespace Bugs
5 class Bug2
7 struct MyByte
9 private byte value;
10 public MyByte(byte value)
12 this.value = value;
14 public static implicit operator MyByte(byte value)
16 return new MyByte(value);
18 public static implicit operator byte(MyByte b)
20 return b.value;
24 struct MyInt
26 private int value;
27 public MyInt(int value)
29 this.value = value;
31 public static implicit operator MyInt(int value)
33 return new MyInt(value);
35 public static implicit operator int(MyInt b)
37 return b.value;
41 public static void Main(string[] args)
43 MyByte b = 255;
44 b += 255;
45 Console.WriteLine(b);
47 MyInt i = 3;
48 i &= (4 + i);
49 Console.WriteLine(i);