Merge pull request #5567 from kumpera/fix_59334
[mono.git] / mono / mini / aot-tests.cs
index 36c7a15a3e8fe91e1c44ebe8d40cf6546c441994..7f3dafea5c602ab31d1db9590fca9253b7f2a265 100644 (file)
@@ -4,6 +4,7 @@ using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
+using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 
@@ -485,4 +486,16 @@ class Tests
                m.Invoke (arr, null);
                return 0;
        }
+
+       public static int test_0_fault_clauses () {
+               object [] data = { 1, 2, 3 };
+               int [] expected = { 1, 2, 3 };
+
+               try {
+                       Action d = delegate () { data.Cast<IEnumerable> ().GetEnumerator ().MoveNext (); };
+                       d ();
+               } catch (Exception ex) {
+               }
+               return 0;
+       }
 }