Generic instances can end up extending a GTD.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 13 Oct 2010 18:53:38 +0000 (15:53 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 13 Oct 2010 18:53:38 +0000 (15:53 -0300)
* verify.c (mono_verifier_verify_class): The generic instance
over its parent generic arguments will end up extending a GTD.
The check against not extending a GTD is only valid for not
generic instance types.

mono/metadata/verify.c

index c6f4197d98faf386b995bdc6178867ba4113821d..c4a7ad54a7b6e3833a5ab76409e8e7fa0020d2af 100644 (file)
@@ -5968,7 +5968,7 @@ mono_verifier_verify_class (MonoClass *class)
        if (class->parent) {
                if (MONO_CLASS_IS_INTERFACE (class->parent))
                        return FALSE;
-               if (class->parent->generic_container)
+               if (!class->generic_class && class->parent->generic_container)
                        return FALSE;
        }
        if (class->generic_container && (class->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_EXPLICIT_LAYOUT)