From f1d50e8ca184515495089158af88b8a06e90ca96 Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Tue, 6 Aug 2024 16:48:49 -0400 Subject: [PATCH] Simplify the parameter checks for overrides. DO NOT MERGE, probably. See discussion from about https://github.com/jspecify/jspecify-reference-checker/issues/193#issuecomment-2253295876 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. --- .../common/basetype/BaseTypeVisitor.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java index 21f5bbaf089f..353ffdd69576 100644 --- a/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java +++ b/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java @@ -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; }