mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 16:43:13 -10:00
Relax assert in ResolveTokenInScope (#38542)
`ResolveTokenInScope` now gets called with `typeOrMethodContext` that is a non-generic method. Make sure the method is on the same type.
This commit is contained in:
1 parent
826b6f0a94
commit
d58e5bbcdf
1 file changed
+3
-1
@@ -1010,8 +1010,10 @@ namespace Internal.JitInterface
|
||||
else
|
||||
{
|
||||
var methodContext = (MethodDesc)typeOrMethodContext;
|
||||
Debug.Assert(methodContext.GetTypicalMethodDefinition() == owningMethod.GetTypicalMethodDefinition() ||
|
||||
Debug.Assert((!methodContext.HasInstantiation && !owningMethod.HasInstantiation) ||
|
||||
methodContext.GetTypicalMethodDefinition() == owningMethod.GetTypicalMethodDefinition() ||
|
||||
(owningMethod.Name == "CreateDefaultInstance" && methodContext.Name == "CreateInstance"));
|
||||
Debug.Assert(methodContext.OwningType.HasSameTypeDefinition(owningMethod.OwningType));
|
||||
typeInst = methodContext.OwningType.Instantiation;
|
||||
methodInst = methodContext.Instantiation;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user