Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Optional Checker.

**Closed issues:**

eisop#792.

Version 3.49.5-eisop1 (April 26, 2026)
--------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ public Void visitWildcard(AnnotatedWildcardType wildcard, Void aVoid) {
}
visitedNodes.put(wildcard, null);

// visitDeclared already copies annotations from the declaration to synthetic wildcard type
// arguments of raw types. If this visitor scans those wildcards' bounds, it may visit a
// nested wildcard that is not itself a type argument of the raw parent, so there is no
// corresponding type parameter from which to propagate annotations.
if (AnnotatedTypes.isTypeArgOfRawType(wildcard)) {
return null;
}

Element typeParamElement = TypesUtils.wildcardToTypeParam(wildcard.getUnderlyingType());
if (typeParamElement == null && !parents.isEmpty()) {
typeParamElement = getTypeParameterElement(wildcard, parents.peekFirst());
Expand Down
5 changes: 5 additions & 0 deletions framework/tests/all-systems/RawtypeCrash.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@SuppressWarnings("all") // Raw type use is intentional: this is a no-crash regression test.
public class RawtypeCrash<V> {
RawtypeCrash<? extends V> nullObj = null;
Object obj = ((RawtypeCrash) null).nullObj;
}
4 changes: 4 additions & 0 deletions framework/tests/viewpointtest/RawtypeCrash.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public class RawtypeCrash<V> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this problem specific to the viewpoint checker?
Would it be better to add to all-systems (possibly suppressing all warnings to just check for the crash)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried Nullness, Interning, and Tainting checkers and did not see this BugInCF crash from RawtypeCrash there.

Do you think we should keep it in the viewpoint checker tests or move it all-systems?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the only checker that is breaking with this code is the Viewpoint Checker, maybe it needs a change? Why does no other type checker fail with this code? Doesn't that indicate that the VP Checker is doing something wrong?

In any case, isn't this another argument to move it to all-systems, to ensure that all type systems work with this code?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding all-systems to ViewpointTestCheckerTest. It exposes many additional viewpoint-checker failures/crashes, so enabling it wholesale is a follow-up task.

For this PR, I will keep the small duplicated viewpointtest/RawtypeCrash.java. The all-systems copy provides useful broad coverage, but by itself it does not exercise the viewpoint checker.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other failures are also discussed in #433.

RawtypeCrash<? extends V> nullObj = null;
Object obj = ((RawtypeCrash) null).nullObj;
}
Loading