-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wildcards are only not equal if they are provably distinct
- Loading branch information
Showing
3 changed files
with
81 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import org.checkerframework.checker.tainting.qual.Untainted; | ||
|
||
public class TaintingIssue6025 { | ||
|
||
public interface A<T> {} | ||
|
||
private static final class B<T> {} | ||
|
||
public interface C<T1 extends A<?>, T2 extends A<?>> {} | ||
|
||
private final B<C<? extends A<?>, ? extends A<?>>> one = new B<>(); | ||
private final B<C<? extends A<?>, ? extends A<?>>> two = new B<>(); | ||
|
||
void f(boolean b) { | ||
// :: error: (assignment) | ||
B<C<@Untainted ?, ?>> three1 = one; | ||
// :: error: (assignment) | ||
B<C<?, @Untainted ?>> three = b ? two : one; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
public class Issue6025 { | ||
|
||
public interface A<T> {} | ||
|
||
private static final class B<T> {} | ||
|
||
public interface C<T1 extends A<?>, T2 extends A<?>> {} | ||
|
||
private final B<C<? extends A<?>, ? extends A<?>>> one = new B<>(); | ||
private final B<C<? extends A<?>, ? extends A<?>>> two = new B<>(); | ||
|
||
void f(boolean b) { | ||
B<C<?, ?>> three1 = one; | ||
B<C<?, ?>> three = b ? two : one; | ||
} | ||
} |