Skip to content

Commit

Permalink
Use a getter instead of accessing a field on JCInstance
Browse files Browse the repository at this point in the history
#1106

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=313258773
  • Loading branch information
cushon authored and kevinb9n committed May 26, 2020
1 parent 6756588 commit 0206396
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private static int getPrecedence(JCTree leaf, Context context) {
return (typeCast.expr == leaf) ? TreeInfo.prefixPrec : TreeInfo.noPrec;
} else if (parent instanceof JCInstanceOf) {
JCInstanceOf instanceOf = (JCInstanceOf) parent;
return TreeInfo.ordPrec + ((instanceOf.clazz == leaf) ? 1 : 0);
return TreeInfo.ordPrec + ((instanceOf.getType() == leaf) ? 1 : 0);
} else if (parent instanceof JCArrayAccess) {
JCArrayAccess arrayAccess = (JCArrayAccess) parent;
return (arrayAccess.indexed == leaf) ? TreeInfo.postfixPrec : TreeInfo.noPrec;
Expand Down

0 comments on commit 0206396

Please sign in to comment.