Skip to content

Commit

Permalink
Simplify the parameter checks for overrides.
Browse files Browse the repository at this point in the history
DO NOT MERGE, probably.

See discussion from about
jspecify/jspecify-reference-checker#193 (comment)
onward.

This PR is a lazy way for me to run tests, since I don't trust myself to
find the right way to run them all locally.
  • Loading branch information
cpovirk committed Aug 7, 2024
1 parent 913f115 commit 85c2470
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4600,14 +4600,8 @@ private boolean checkParameters() {

boolean result = true;
for (int i = 0; i < overriderParams.size(); ++i) {
AnnotatedTypeMirror capturedParam =
atypeFactory.applyCaptureConversion(overriddenParams.get(i));
boolean success = typeHierarchy.isSubtype(capturedParam, overriderParams.get(i));
if (!success) {
success =
testTypevarContainment(overriddenParams.get(i), overriderParams.get(i));
}

boolean success =
typeHierarchy.isSubtype(overriddenParams.get(i), overriderParams.get(i));
checkParametersMsg(success, i, overriderParams, overriddenParams);
result &= success;
}
Expand Down

0 comments on commit 85c2470

Please sign in to comment.