Skip to content

Commit

Permalink
revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
txiang61 committed Mar 25, 2020
1 parent e4b4213 commit d210933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/checkers/inference/InferenceVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,7 @@ public boolean maybeAddRefinementVariableConstraints(final AnnotatedTypeMirror v
logger.fine("InferenceVisitor::commonAssignmentCheck: Equality constraint for qualifiers sub: " + sub + " sup: " + sup);

// Equality between the refvar and the value
if (sub != null) {
constraintManager.addEqualityConstraint(sup, sub);
}
constraintManager.addEqualityConstraint(sup, sub);

// Refinement variable still needs to be a subtype of its declared type value
constraintManager.addSubtypeConstraint(sup,
Expand Down
7 changes: 2 additions & 5 deletions src/checkers/inference/VariableAnnotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,8 @@ private void annotateNewArray(AnnotatedTypeMirror type, Tree tree, int level, Tr

// Create a variable from an ASTPath
final TreePath pathToTree = inferenceTypeFactory.getPath(topLevelTree);
ASTRecord astRec = ASTPathUtil.getASTRecordForPath(inferenceTypeFactory, pathToTree);
if (astRec != null) {
astRec = astRec.newArrayLevel(level);
replaceOrCreateEquivalentVarAnno(type, tree, new AstPathLocation(astRec));
}
ASTRecord astRec = ASTPathUtil.getASTRecordForPath(inferenceTypeFactory, pathToTree).newArrayLevel(level);;
replaceOrCreateEquivalentVarAnno(type, tree, new AstPathLocation(astRec));

} else if (!(tree.getKind() == Tree.Kind.NEW_ARRAY
|| tree.getKind() == Tree.Kind.ARRAY_TYPE)) {
Expand Down

0 comments on commit d210933

Please sign in to comment.