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 6, 2024
1 parent 7f6c29e commit f1d50e8
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4600,14 +4600,7 @@ 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 f1d50e8

Please sign in to comment.