You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make EnumAllVirtualSlots return slots for interfaces (#121438)
Calling `EnumAllVirtualSlots` on classes returns all `newslot` methods
that exist in the class hierarchy. Calling this on interfaces produced
an empty enumeration.
For runtime-async, it would be convenient if this returned the logical
slots on interfaces. While interfaces don't have physical slots, they
still have logical slots, so it's not a big stretch.
Doing this now simplifies things in some places, and requires an extra
`if` check in other places. But it will be really convenient for
runtime-async.
Copy file name to clipboardExpand all lines: src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TypeValidationChecker.cs
AddTypeValidationError(type,$"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' which does not have matching generic constraints");
AddTypeValidationError(type,$"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' does not satisfy the covariant return type introduced with '{implementationOnBaseType}'");
508
+
AddTypeValidationError(type,$"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' which does not have matching generic constraints");
518
509
returnfalse;
519
510
}
511
+
512
+
// Validate that if the decl method for the virtual is not on the immediate base type, that the intermediate type did not establish a
513
+
// covariant return type which requires the implementation method to specify a more specific base type
AddTypeValidationError(type,$"Virtual method '{virtualMethod}' overridden by method '{implementationMethod}' does not satisfy the covariant return type introduced with '{implementationOnBaseType}'");
520
+
returnfalse;
521
+
}
522
+
}
520
523
}
521
-
}
522
524
523
-
// Validate that all virtual static methods are actually implemented if the type is not abstract
524
-
// Validate that all virtual instance methods are actually implemented if the type is not abstract
0 commit comments