Skip to content

Commit

Permalink
Update with new CF API
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong committed Apr 24, 2024
1 parent b069f96 commit 5dc55b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public AnnotatedDeclaredType getSelfType(Tree tree) {
if (enclosingClass == null) {
// I hope this only happens when tree is a fake tree that
// we created, e.g. when desugaring enhanced-for-loops.
enclosingClass = getCurrentClassTree(tree);
enclosingClass = TreePathUtil.enclosingClass(getPath(tree));
}
// "type" is right now VarAnnot inserted to the bound of "enclosingClass"
AnnotatedDeclaredType type = getAnnotatedType(enclosingClass);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/pico/inference/PICOVariableAnnotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void storeElementType(Element element, AnnotatedTypeMirror atm) {
// Copied from super implementation
@Override
protected boolean handleWasRawDeclaredTypes(AnnotatedDeclaredType adt) {
if (adt.wasRaw() && adt.getTypeArguments().size() != 0) {
if (adt.isUnderlyingTypeRaw() && adt.getTypeArguments().size() != 0) {
// the type arguments should be wildcards AND if I get the real type of "tree"
// it corresponds to the declaration of adt.getUnderlyingType
Element declarationEle = adt.getUnderlyingType().asElement();
Expand Down

0 comments on commit 5dc55b7

Please sign in to comment.