-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method call for testing RD class substitution #1032
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@@ -5073,9 +5074,18 @@ public boolean isValidUse( | |||
AnnotationMirrorSet tops = qualHierarchy.getTopAnnotations(); | |||
TypeMirror declarationTM = declarationType.getUnderlyingType(); | |||
AnnotationMirrorSet upperBounds = atypeFactory.getTypeDeclarationBounds(declarationTM); | |||
AbstractViewpointAdapter vpa = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visitor should not adapt types. I think we should change atypeFactory.getTypeDeclarationBounds
to take what it needs to determine the correct bounds for a particular use.
Then the factory that has a viewpoint adaptor can add the adaptation logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let me try to move the adaptation over.
@@ -2,15 +2,14 @@ | |||
// https://github.com/eisop/checker-framework/issues/777 | |||
import viewpointtest.quals.*; | |||
|
|||
public class VarargsConstructor { | |||
|
|||
@ReceiverDependentQual public class VarargsConstructor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be two variants of the test? Why is it enough to add RDQ here? Some comments would be helpful to understand these tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think right now viewpoint test checker has a lot suppress warnings and errors because of we default everything to Top. Since we also forbid Top object creation, I would like to make viewpoint test checker more PICO like system, i.e. default Object to RDQ and make A as the default qualifier.
No description provided.