Add type as part of target location#972
Conversation
|
Hi @wmdietl, do you know how to update the It is later retrieved at here. The expected error did not come up because in the |
|
The root cause should be here as the method which does not consider bound in |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for applying @DefaultQualifier at a new TypeUseLocation.TYPE to default top-level class/interface/enum/record types, along with a regression test.
Changes:
- Introduce
TypeUseLocation.TYPEenum constant and documentation. - Apply defaults for
TYPEinQualifierDefaultsusing the element cache to detect/avoid conflicting annotations. - Add a viewpoint test that exercises invalid annotation interactions with the new
TYPElocation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| framework/tests/viewpointtest/DefaultQualifierTest.java | Adds a regression test for defaulting behavior at TypeUseLocation.TYPE. |
| framework/src/main/java/org/checkerframework/framework/util/defaults/QualifierDefaults.java | Implements default application logic for the new TYPE location. |
| framework/src/main/java/org/checkerframework/framework/type/AnnotatedTypeFactory.java | Exposes the element cache for use in defaulting logic. |
| checker-qual/src/main/java/org/checkerframework/framework/qual/TypeUseLocation.java | Adds TYPE as a new location and documents its semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge with eisop/jdk#134.