Initial set of Ward sgen annotations (#5705)
[mono.git] / mono / tests / generic-box.2.cs
index c6ccafc6bf16d65b860ed2a0f7ba02dcdd119fa4..0bea4ab1cf805a5074b80efc2a3968eeaee5ac91 100644 (file)
@@ -1,4 +1,6 @@
 using System.Collections.Generic;
+using UnboxTest;
+using BoxTest;
 
 public class ClassA {}
 
@@ -56,6 +58,16 @@ public class main {
                        return 1;
                */
 
+               UnboxerStruct<ClassA> us;
+               Boxer<ClassA> b = new Boxer<ClassA> ();
+
+               us.field = 123;
+
+               if (((UnboxerStruct<ClassA>?)b.boxNullable (us)).Value.field != 123)
+                       return 1;
+               if (b.boxNullable (null) != null)
+                       return 1;
+
                return 0;
        }
 }