Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

25
mcs/tests/test-445.cs Normal file
View File

@@ -0,0 +1,25 @@
using System;
public class ConvFromInt {
public int val;
public ConvFromInt () { val = 0; }
public ConvFromInt (int value) { val = value + 1; }
public static implicit operator ConvFromInt (int value) { return new ConvFromInt (value); }
}
public class Foo
{
public static ConvFromInt i = 0;
public static object BoolObj = (bool) false;
public static object ByteObj = (byte) 0;
public static ValueType BoolVal = (bool) false;
public static void Main ()
{
if (i == null) throw new Exception ("i");
if (i.val == 0) throw new Exception ("i.val");
if (BoolObj == null) throw new Exception ("BoolObj");
if (ByteObj == null) throw new Exception ("ByteObj");
if (BoolVal == null) throw new Exception ("BoolVal");
}
}