* TypeBuilder.cs (SetParent): Null parent is allowed for
interfaces. . This was exposed by the VB compiler
svn path=/trunk/mcs/; revision=64981
+2006-09-05 Miguel de Icaza <miguel@novell.com>
+
+ * TypeBuilder.cs (SetParent): Null parent is allowed for
+ interfaces.
+
2006-09-02 Zoltan Varga <vargaz@gmail.com>
* DynamicMethod.cs: Fix a warning.
}
}
public void SetParent (Type parentType) {
- if (parentType == null)
- throw new ArgumentNullException ("parentType");
check_not_created ();
+ if (parentType == null && (attrs & TypeAttributes.Interface) == 0)
+ throw new ArgumentNullException ("parentType");
+
parent = parentType;
// will just set the parent-related bits if called a second time
setup_internal_class (this);