diff options
author | jfrijters <jfrijters> | 2011-05-10 13:01:09 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-05-10 13:01:09 +0400 |
commit | 261f3ba84178e9402fd4d953152762c261b34cac (patch) | |
tree | dca5e7249d9b0bba6a9f1fa3902269f6dd8a0e14 /reflect/Emit | |
parent | ebf371dc7274e795070552bbb6a35c5bfddbecc1 (diff) |
Fix. DefineNestedType should accept a null reference for the interfaces parameter.
Diffstat (limited to 'reflect/Emit')
-rw-r--r-- | reflect/Emit/TypeBuilder.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/reflect/Emit/TypeBuilder.cs b/reflect/Emit/TypeBuilder.cs index b3e4da71..61320b3b 100644 --- a/reflect/Emit/TypeBuilder.cs +++ b/reflect/Emit/TypeBuilder.cs @@ -415,9 +415,12 @@ namespace IKVM.Reflection.Emit public TypeBuilder DefineNestedType(string name, TypeAttributes attr, Type parent, Type[] interfaces) { TypeBuilder tb = DefineNestedType(name, attr, parent); - foreach (Type iface in interfaces) + if (interfaces != null) { - tb.AddInterfaceImplementation(iface); + foreach (Type iface in interfaces) + { + tb.AddInterfaceImplementation(iface); + } } return tb; } |