different check
[mono.git] / mcs / tests / test-119.cs
index ad271f6ffe7f528d95ac80a876c45a58f6374c72..be7d7695a226769d66e653e436fe9df06406ad3a 100644 (file)
@@ -31,10 +31,20 @@ class Derived : MyObject {
 }
 
 class Test {
-       static void Main ()
+       static int Main ()
        {
                Value v = new Value ();
 
-               Derived d = (Derived) v;
+               v = null;
+
+               try {
+                       // This will throw an exception.
+                       // This test is more of a compile test, we need a real
+                       // good test that does not require this lame catch.
+                       Derived d = (Derived) v;
+               } catch {
+               }
+
+               return 0;
        }
 }