Merge pull request #5390 from kumpera/fix_58637
[mono.git] / mono / tests / exception.cs
old mode 100755 (executable)
new mode 100644 (file)
index b5667fb..c60e9a3
@@ -2,6 +2,19 @@ using System;
 
 public class Ex {
 
+       int p;
+       
+       public static int test1 () {
+                Ex x = null;
+               
+               try {
+                       x.p = 1;
+               } catch (NullReferenceException) {
+                       return 0;
+               }
+               return 1;
+       }
+       
        public static int test (int a) {
                int res;
                int fin = 0;
@@ -25,8 +38,11 @@ public class Ex {
        public static int Main () {
                if (test(1) != 10)
                        return 1;
-               if (test(0) != 33)
+               if (test(0) != 34)
                        return 2;
+               if (test1() != 0)
+                       return 3;
+               
                return 0;
        }
 }