2008-08-31 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / tests / test-445.cs
blobfb9739e6b4206e4214a5f2c8b03edcd122e49fb7
1 using System;
3 public class ConvFromInt {
4 public int val;
5 public ConvFromInt () { val = 0; }
6 public ConvFromInt (int value) { val = value + 1; }
7 public static implicit operator ConvFromInt (int value) { return new ConvFromInt (value); }
10 public class Foo
12 public static ConvFromInt i = 0;
13 public static object BoolObj = (bool) false;
14 public static object ByteObj = (byte) 0;
15 public static ValueType BoolVal = (bool) false;
17 public static void Main ()
19 if (i == null) throw new Exception ("i");
20 if (i.val == 0) throw new Exception ("i.val");
21 if (BoolObj == null) throw new Exception ("BoolObj");
22 if (ByteObj == null) throw new Exception ("ByteObj");
23 if (BoolVal == null) throw new Exception ("BoolVal");