Apparently we should emit a TypeRef for types used in DeclSecurity.

This commit is contained in:
jfrijters 2011-03-06 07:07:17 +00:00
Родитель eb2156834f
Коммит 98264ff8a7
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -398,6 +398,11 @@ namespace IKVM.Reflection.Emit
bb.WriteCompressedInt(list.Count);
foreach (CustomAttributeBuilder cab in list)
{
if (cab.Constructor.Module != this)
{
// to make ildasm show the type properly, we need to have a TypeRef to the type
ImportType(cab.Constructor.DeclaringType);
}
bb.Write(cab.Constructor.DeclaringType.AssemblyQualifiedName);
namedArgs.Clear();
cab.WriteNamedArgumentsForDeclSecurity(this, namedArgs);