From 59bdf36431066da4de0b2bb90b7d65b6d63c7e35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 23:38:04 +0000 Subject: [PATCH 1/2] Initial plan From 665f02d49e38908a030266b5ab30c0c1c0ffb6a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 23:44:06 +0000 Subject: [PATCH 2/2] Replace else-if with else + Debug.Assert for AcquiresInstMethodTableFromThis() Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com> --- .../tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs index 5dc003a79f081c..49820dc03374d9 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs @@ -796,8 +796,9 @@ private void ImportCall(ILOpcode opcode, int token) { instParam = GetGenericLookupHelper(ReadyToRunHelperId.TypeHandle, runtimeDeterminedMethod.OwningType); } - else if (targetMethod.AcquiresInstMethodTableFromThis()) + else { + Debug.Assert(targetMethod.AcquiresInstMethodTableFromThis()); _dependencies.Add(_factory.ShadowNonConcreteMethod(concreteMethod), reason); }