Skip to content

Commit

Permalink
redirect object base type when member cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 committed Mar 25, 2022
1 parent fb599dc commit bcea5b6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,11 @@ public override IMethodDefOrRef ImportMethod(IMethodDefOrRef method)
? (IMethodDefOrRef) clonedMethod
: base.ImportMethod(method);
}

/// <inheritdoc />
protected override ITypeDefOrRef ImportType(TypeReference type)
{
return type.Namespace == "System" && type.Name == nameof(System.Object) ? _context.Module.CorLibTypeFactory.Object.Type : base.ImportType(type);
}
}
}
}

0 comments on commit bcea5b6

Please sign in to comment.