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

Pipe compiles to wrong semantics #933

Closed
cie opened this issue Jan 31, 2024 · 2 comments · Fixed by #937
Closed

Pipe compiles to wrong semantics #933

cie opened this issue Jan 31, 2024 · 2 comments · Fixed by #937
Labels
bug Something isn't working

Comments

@cie
Copy link

cie commented Jan 31, 2024

Hello! Awesome project!
It seems to me that this

init()
readFile()
|> .content
|> .value

incorrectly compiles to

init()(readFile().content).value;

while I would expect

init();
readFile().content.value;

However it works correctly for these:

init()
readFile()
|> .content
|> value

init()
readFile()
|> content
|> .value
init();
value(readFile().content);

init();
content(readFile()).value;
@edemaine edemaine added the bug Something isn't working label Jan 31, 2024
@edemaine
Copy link
Collaborator

edemaine commented Jan 31, 2024

This is an ASI (Automatic Semicolon Insertion) bug. Thanks for reporting!

edemaine added a commit that referenced this issue Feb 1, 2024
@edemaine
Copy link
Collaborator

edemaine commented Feb 2, 2024

Should be fixed in 0.6.66. Thanks again for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants