Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-119.cs
index ad271f6ffe7f528d95ac80a876c45a58f6374c72..29d5e008c0f0baf996e232b9f0607bfd302036e2 100644 (file)
@@ -31,10 +31,20 @@ class Derived : MyObject {
 }
 
 class Test {
-       static void Main ()
+       public 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;
        }
 }