diff --git a/checker/tests/tainting/NestedAnonymous.java b/checker/tests/tainting/NestedAnonymous.java new file mode 100644 index 00000000000..4fe15a787e2 --- /dev/null +++ b/checker/tests/tainting/NestedAnonymous.java @@ -0,0 +1,14 @@ +import org.checkerframework.checker.tainting.qual.Tainted; +import org.checkerframework.checker.tainting.qual.Untainted; + +class NestedAnonymous { + Object o1 = new @Tainted Object() {}; + Object o2 = new Outer.@Tainted Inner() {}; + + // :: error: (assignment.type.incompatible) + Outer.@Untainted Inner unt = new Outer.@Tainted Inner() {}; + + static class Outer { + static class Inner {} + } +} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 26b16c7da5a..5accf53bb6e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,6 +6,7 @@ Version 3.21.4-eisop2 (April ?, 2022) **Implementation details:** **Closed issues:** +eisop#210. Version 3.21.4-eisop1 (April 4, 2022) diff --git a/framework/src/main/java/org/checkerframework/framework/util/element/VariableApplier.java b/framework/src/main/java/org/checkerframework/framework/util/element/VariableApplier.java index 7924b891b52..415088af4be 100644 --- a/framework/src/main/java/org/checkerframework/framework/util/element/VariableApplier.java +++ b/framework/src/main/java/org/checkerframework/framework/util/element/VariableApplier.java @@ -83,7 +83,8 @@ protected TargetType[] validTargets() { TargetType.CONSTRUCTOR_REFERENCE, TargetType.METHOD_REFERENCE_TYPE_ARGUMENT, TargetType.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT, - TargetType.METHOD_FORMAL_PARAMETER + TargetType.METHOD_FORMAL_PARAMETER, + TargetType.CLASS_EXTENDS }; }