private bool CompareTypeSigWithType(ref NativeParser parser, TypeManagerHandle moduleHandle, Handle typeHandle)
{
- while (typeHandle.HandleType == HandleType.TypeSpecification)
+ while (typeHandle.HandleType == HandleType.TypeSpecification
+ || typeHandle.HandleType == HandleType.ModifiedType)
{
- typeHandle = typeHandle
- .ToTypeSpecificationHandle(_metadataReader)
- .GetTypeSpecification(_metadataReader)
- .Signature;
+ if (typeHandle.HandleType == HandleType.TypeSpecification)
+ {
+ typeHandle = typeHandle
+ .ToTypeSpecificationHandle(_metadataReader)
+ .GetTypeSpecification(_metadataReader)
+ .Signature;
+ }
+ else
+ {
+ typeHandle = typeHandle
+ .ToModifiedTypeHandle(_metadataReader)
+ .GetModifiedType(_metadataReader)
+ .Type;
+ }
}
// startOffset lets us backtrack to the TypeSignatureKind for external types since the TypeLoader