Browse Source

add support for PinnedType in DecompilerTypeSystem

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

8
ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs

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

Loading…
Cancel
Save