Skip to content

Commit

Permalink
Reintroduce uses of var
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 423116100
  • Loading branch information
cushon authored and Error Prone Team committed Jan 20, 2022
1 parent c7ebcaa commit 2911dab
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 @@ -103,7 +103,7 @@ private void withinScope(Truthiness truthiness, Tree tree) {
@Override
public Void visitMethodInvocation(MethodInvocationTree tree, Void unused) {
if (OPTIONAL_GET.matches(tree, state)) {
ExpressionTree receiver = getReceiver(tree);
var receiver = getReceiver(tree);
if (receiver != null) {
constantExpressions
.constantExpression(receiver, state)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public void accept(ConstantExpressionVisitor visitor) {
*/
public Optional<PureMethodInvocation> symbolizeImmutableExpression(
ExpressionTree tree, VisitorState state) {
ExpressionTree receiver =
var receiver =
tree instanceof MethodInvocationTree || tree instanceof MemberSelectTree
? getReceiver(tree)
: null;
Expand Down

0 comments on commit 2911dab

Please sign in to comment.