If class handles match, the return types are compatible, no matter
what the jit types indicate.
Addresses dotnet/coreclr#10047.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0acfab2c5ecf7896b4f83bd8988fde0779dd849
return true;
}
+ // If the class handles are the same and not null, the return types are compatible.
+ if ((callerRetTypeClass != nullptr) && (callerRetTypeClass == calleeRetTypeClass))
+ {
+ return true;
+ }
+
#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
// Jit64 compat:
if (callerRetType == TYP_VOID)