In corlib/System.Runtime.InteropServices:
[mono.git] / mcs / gmcs / generic.cs
index ae49fe95fb862f8f3156d66d25a71884a9c21226..689988a63fb9d94302df9942d0673ca03fe5b3be 100644 (file)
@@ -1246,16 +1246,20 @@ namespace Mono.CSharp {
                                        ok = false;
                                        continue;
                                }
-                               if (te is TypeParameterExpr)
+
+                               atypes[i] = te.Type;
+
+                               if (te is TypeParameterExpr) {
                                        has_type_args = true;
+                                       continue;
+                               }
 
-#if !MS_COMPATIBLE
                                if (te.Type.IsSealed && te.Type.IsAbstract) {
                                        Report.Error (718, Location, "`{0}': static classes cannot be used as generic arguments",
                                                te.GetSignatureForError ());
                                        return false;
                                }
-#endif
+
                                if (te.Type.IsPointer) {
                                        Report.Error (306, Location, "The type `{0}' may not be used " +
                                                          "as a type argument", TypeManager.CSharpName (te.Type));
@@ -1266,8 +1270,6 @@ namespace Mono.CSharp {
                                        Expression.Error_VoidInvalidInTheContext (Location);
                                        return false;
                                }
-
-                               atypes [i] = te.Type;
                        }
                        return ok;
                }