Skip to content

Commit 08ac385

Browse files
committed
Align behavior
1 parent 5958e9e commit 08ac385

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,15 +1183,10 @@ private bool getMethodInfo(CORINFO_METHOD_STRUCT_* ftn, CORINFO_METHOD_INFO* inf
11831183
{
11841184
MethodDesc method = HandleToObject(ftn);
11851185

1186-
if (context != null && method.IsSharedByGenericInstantiations)
1186+
if (context != null && method.IsSharedByGenericInstantiations && context != contextFromMethodBeingCompiled())
11871187
{
11881188
TypeSystemEntity ctx = entityFromContext(context);
1189-
if (ctx is MethodDesc methodFromCtx && context != contextFromMethodBeingCompiled())
1190-
{
1191-
Debug.Assert(method.GetTypicalMethodDefinition() == methodFromCtx.GetTypicalMethodDefinition());
1192-
method = methodFromCtx;
1193-
}
1194-
else if (ctx is InstantiatedType instantiatedCtxType)
1189+
if (ctx is InstantiatedType instantiatedCtxType)
11951190
{
11961191
MethodDesc methodTypicalDef = method.GetTypicalMethodDefinition();
11971192
if (methodTypicalDef.RequiresInstMethodDescArg())

0 commit comments

Comments
 (0)