Skip to content

Commit

Permalink
Fix set assignment with pipe
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Jan 21, 2025
1 parent dff88b5 commit c793a42
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,11 @@ private void checkExternalWriteInAsyncClosure(VariableExpression target, Variabl

@Override
public void visitMethodCallExpression(MethodCallExpression node) {
if( !node.isImplicitThis() ) {
var source = node.getObjectExpression();
var target = checkSetAssignment(node);
if( target != null ) {
visit(source);
declareAssignedVariable(target);
return;
}
var target = checkSetAssignment(node);
if( target != null ) {
visit(node.getObjectExpression());
declareAssignedVariable(target);
return;
}
if( node.isImplicitThis() && node.getMethod() instanceof ConstantExpression ) {
var name = node.getMethodAsString();
Expand Down

0 comments on commit c793a42

Please sign in to comment.