dlr bug
[mcs.git] / tests / gtest-386.cs
blobf7c948e64544c903b04bdd13e2ef6d5a719514f5
1 using System;
2 using System.Linq.Expressions;
4 public struct MyType
6 int value;
8 public MyType (int value)
10 this.value = value;
12 public static MyType operator - (MyType a)
14 return new MyType (-a.value);
18 class C
20 public static int Main ()
22 MyType? x = null;
23 MyType? y = -x;
25 checked {
26 float? f = float.MinValue;
27 f = -f + 1;
28 int? i = int.MinValue;
29 try {
30 i = -i;
31 return 1;
32 } catch (OverflowException) { }
35 return 0;