-
Notifications
You must be signed in to change notification settings - Fork 18
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
Explain the need having three validateTargetLocationsXX
methods
#582
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! Just a few small comments.
framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java
Outdated
Show resolved
Hide resolved
* BaseTypeVisitor#validateTargetLocation(Tree, AnnotatedTypeMirror, TypeUseLocation)} is that | ||
* this one is only used in {@link BaseTypeVisitor#visitVariable(VariableTree, Void)}. The three | ||
* different validate methods in the visitor and validator file achieve the same goal and the | ||
* need for having three is due to implementation reasons. We perform checks for types in |
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.
You are documenting the implementation here. So don't say due to implementation reasons
, but instead what those reasons are.
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 clarify the need of having three different validating methods on each method and refer to each other. I think that's better now, please have a look.
framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Werner Dietl <[email protected]>
Follow-up work in #798. |
Explain the conceptual differences between
BaseTypeVisitor#validateVariablesTargetLocation
andBaseTypeVisitor#validateTargetLocation
.