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

SyntaxError bug : Coding style problem #5437

Closed
jefftham opened this issue Feb 25, 2016 · 11 comments
Closed

SyntaxError bug : Coding style problem #5437

jefftham opened this issue Feb 25, 2016 · 11 comments
Labels
repl Issues and PRs related to the REPL subsystem.

Comments

@jefftham
Copy link

i found a bug that node.js stop me the code differently.

Please refer the the following code:-

//no error
var maximum = Math.max(
1,
10);

//error show
var maximum = Math.max(
1
,10);

// error show
var maximum = Math.max(
1,
10
);

I believe the above code should produce the same result, the position of the comma and closing bracket should not affect the result.

However, node.js throw an error message as:-

SyntaxError: missing ) after argument list

I tested the code in node version 0.12.4, no error shown.

@princejwesley
Copy link
Contributor

Working fine in v5.7.0 and master branch.

node 🙈 ₹ uname -a
Darwin Princes-MacBook-Pro.local 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

I assume you're talking about the REPL. It looks like it was fixed in #3823, which was released in 5.7.0.

I'm going to close this. Please let me know if it is not actually fixed.

@cjihrig cjihrig closed this as completed Feb 25, 2016
@princejwesley
Copy link
Contributor

@cjihrig #4060 can be closed.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

Thanks @princejwesley, I'll close it.

@jefftham
Copy link
Author

Thank for your prompt reply, i know that this problem is fixed in v5.7.0
but my company only allows us to use v4.x

can i know if this problem going to solve in node version 4 ?

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

It doesn't look like #3823 has been marked for LTS backport. @jasnell are you planning to backport, or is the semver-minor label blocking it?

@MylesBorins
Copy link
Contributor

Currently #3823 is not scheduled for back-port. It was a semver-minor change that introduced a new feature.

@jefftham is this something that is breaking for you in production, or is more of an inconvenience?

@jefftham
Copy link
Author

it just breaks some code that we wrote in v 0.12.4 ,
anyhow, Thanks a lot for helping me. Really appreciate.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

FWIW, I don't really see #3823 as semver-minor. I would classify it as fixing an existing bug.

@MylesBorins
Copy link
Contributor

@cjihrig would you chime in as much in the issue? Perhaps we could back port it.

@cjihrig
Copy link
Contributor

cjihrig commented Feb 25, 2016

Sure. Done.

@ChALkeR ChALkeR added the repl Issues and PRs related to the REPL subsystem. label Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants