From f001fd4afda8d8ff998c5d102b83026cd4224459 Mon Sep 17 00:00:00 2001 From: puff <33184334+puff@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:29:25 -0400 Subject: [PATCH] Undo removing baseMethod IsVirtual check --- .../Emulation/Dispatch/ObjectModel/CallVirtHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platforms/Echo.Platforms.AsmResolver/Emulation/Dispatch/ObjectModel/CallVirtHandler.cs b/src/Platforms/Echo.Platforms.AsmResolver/Emulation/Dispatch/ObjectModel/CallVirtHandler.cs index ee04a109..09c8b280 100644 --- a/src/Platforms/Echo.Platforms.AsmResolver/Emulation/Dispatch/ObjectModel/CallVirtHandler.cs +++ b/src/Platforms/Echo.Platforms.AsmResolver/Emulation/Dispatch/ObjectModel/CallVirtHandler.cs @@ -59,7 +59,7 @@ protected override MethodDevirtualizationResult DevirtualizeMethodInternal( private static MethodDefinition? FindMethodImplementationInType(TypeDefinition? type, MethodDefinition? baseMethod) { - if (type is null || baseMethod is null) + if (type is null || baseMethod is null || !baseMethod.IsVirtual) return baseMethod; var implementation = default(MethodDefinition);