Raise an exception for user types under FULL_AOT_RUNTIME instead of crashing.
authorRodrigo Kumpera <kumpera@gmail.com>
Fri, 8 Feb 2013 20:10:58 +0000 (15:10 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 8 Feb 2013 20:12:07 +0000 (15:12 -0500)
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System/Type.cs

index 79d9e15a18d03e589618fabc7475c4dcea39b581..fe381b93a9db15f6cc4627d604c6dd7d207e0b4f 100644 (file)
@@ -394,8 +394,10 @@ namespace System.Reflection {
                                        hasUserType = true;
                        }
 
-#if !FULL_AOT_RUNTIME
                        if (hasUserType)
+#if FULL_AOT_RUNTIME
+                               throw new NotSupportedException ("User types are not supported under full aot");
+#else
                                return new MethodOnTypeBuilderInst (this, methodInstantiation);
 #endif
 
index 8371a43b4f53fcec221cab9c2597bc707a746abd..8b6b970747c7f86955706765d4562e54d5a9581d 100644 (file)
@@ -1442,11 +1442,13 @@ namespace System {
                                systemTypes [i] = t;
                        }
 
-#if !FULL_AOT_RUNTIME
                        if (hasUserType) {
+#if FULL_AOT_RUNTIME
+                               throw new NotSupportedException ("User types are not supported under full aot");
+#else
                                return new MonoGenericClass (this, typeArguments);
-                       }
 #endif
+                       }
 
                        Type res = MakeGenericType (this, systemTypes);
                        if (res == null)