Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL syntax error when closing bracket & parenthesis are on different lines #4060

Closed
Darkle opened this issue Nov 28, 2015 · 5 comments
Closed
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.

Comments

@Darkle
Copy link

Darkle commented Nov 28, 2015

I seem to be getting a syntax error SyntaxError: missing ) after argument list with the following code:

Promise.resolve('finished').then(function(result){
  console.log(result)
}
)

However if I put the closing bracket and parenthesis on the same line, there's no error:

Promise.resolve('finished').then(function(result){
  console.log(result)
})

Tested in node 4.2.1 & node 5.1.0 on OSX 10.11.1

@Fishrock123
Copy link
Contributor

At first look, seems like it might be because of the indentation level.

@Fishrock123
Copy link
Contributor

Nope, I was wrong. :/

@zeusdeux
Copy link
Contributor

zeusdeux commented Dec 7, 2015

Here are two simple test scenarios to reproduce this:

a({
}
)

a([
]
)

So while

({
}
)

// and

([
]
)

// and

((
)
) 

work correctly, a function call breaks. Also the third one (the one with only parens) throws but that's correct behaviour.

@Fishrock123 Fishrock123 added the confirmed-bug Issues with confirmed bugs. label Dec 17, 2015
tomgco added a commit to tomgco/node that referenced this issue Jan 22, 2016
This fixes nodejs#4060, which breaks due to the error: `missing ) after
argument list` and is not treated as recoverable.
tomgco added a commit to tomgco/node that referenced this issue Jan 22, 2016
This fixes nodejs#4060, which breaks due to the error: `missing ) after
argument list` and is not treated as recoverable.
@princejwesley
Copy link
Contributor

@mscdex #3823 fixes this issue.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

Closing per #5437 (comment)

@cjihrig cjihrig closed this as completed Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants