Browse Source

add support for PinnedType in DecompilerTypeSystem

pull/728/head
Siegfried Pammer 11 years ago
parent
commit
a6ca46f838
  1. 4
      ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs

4
ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs

@ -117,8 +117,12 @@ namespace ICSharpCode.Decompiler
if (typeReference == null) if (typeReference == null)
return SpecialType.UnknownType; return SpecialType.UnknownType;
ITypeReference typeRef; ITypeReference typeRef;
if (typeReference is PinnedType) {
typeRef = new NRefactory.TypeSystem.ByReferenceType(Resolve(((PinnedType)typeReference).ElementType)).ToTypeReference();
} else {
lock (typeReferenceCecilLoader) lock (typeReferenceCecilLoader)
typeRef = typeReferenceCecilLoader.ReadTypeReference(typeReference); typeRef = typeReferenceCecilLoader.ReadTypeReference(typeReference);
}
return typeRef.Resolve(context); return typeRef.Resolve(context);
} }
#endregion #endregion

Loading…
Cancel
Save