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

Different expression compilation whith different whitespace #2485

Closed
hakunin opened this issue Aug 9, 2012 · 1 comment
Closed

Different expression compilation whith different whitespace #2485

hakunin opened this issue Aug 9, 2012 · 1 comment

Comments

@hakunin
Copy link

hakunin commented Aug 9, 2012

Just stumbled upon this accidentaly:

d(1) + '' + d(2)
# compiles as
# d(1) + '' + d(2);

d(1) +''+ d(2)
# compiles as
# d(1)(+'' + d(2));

In both cases, I expect the first compilation to be the correct one.

@michaelficarra
Copy link
Collaborator

See the previous issues about this. An unspaced + is treated as a unary +. This is a whitespace-sensitive language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants