Skip to content

Commit 0c77cbe

Browse files
Fix outerloop CI error (#87789)
* Fix issue where type validation checker failed to instantiate signature before performing signature comparison
1 parent 6240d80 commit 0c77cbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeValidationChecker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
314314
var methodDecl = type.EcmaModule.GetMethod(methodImpl.MethodDeclaration);
315315

316316
// Validate that all MethodImpls actually match signatures closely enough
317-
if (!methodBody.Signature.EqualsWithCovariantReturnType(methodDecl.Signature))
317+
if (!methodBody.Signature.ApplySubstitution(type.Instantiation).EqualsWithCovariantReturnType(methodDecl.Signature.ApplySubstitution(type.Instantiation)))
318318
{
319319
AddTypeValidationError(type, $"MethodImpl with Body '{methodBody}' and Decl '{methodDecl}' do not have matching signatures");
320320
return false;
@@ -437,7 +437,7 @@ Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation)
437437
if ((virtualMethod.OwningType != type.BaseType) && (virtualMethod.OwningType != type) && (baseTypeVirtualMethodAlgorithm != null))
438438
{
439439
var implementationOnBaseType = baseTypeVirtualMethodAlgorithm.FindVirtualFunctionTargetMethodOnObjectType(virtualMethod, type.BaseType);
440-
if (!implementationMethod.Signature.EqualsWithCovariantReturnType(implementationOnBaseType.Signature))
440+
if (!implementationMethod.Signature.ApplySubstitution(type.Instantiation).EqualsWithCovariantReturnType(implementationOnBaseType.Signature.ApplySubstitution(type.Instantiation)))
441441
{
442442
AddTypeValidationError(type, $"Virtual method '{virtualMethod}' overriden by method '{implementationMethod}' does not satisfy the covariant return type introduced with '{implementationOnBaseType}'");
443443
return false;

0 commit comments

Comments
 (0)