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

Two empty string interpolations close to each other give parsing errors #54

Closed
yaglo opened this issue May 30, 2023 · 0 comments · Fixed by #55
Closed

Two empty string interpolations close to each other give parsing errors #54

yaglo opened this issue May 30, 2023 · 0 comments · Fixed by #55

Comments

@yaglo
Copy link

yaglo commented May 30, 2023

I know it's a bit contrived but it can be an indicator of a bigger underlying issue.

When two strings with empty interpolations are together in one expression, they are being parsed with errors, but are perfectly fine from the Elixir's parser standpoint:

["#{}", "#{}"]
"#{}" <> "#{}"
[one: ~s"#{}", two: ~s"#{}"]

iex:

iex(21)> ["#{}", "#{}"]
["", ""]
iex(22)> "#{}" <> "#{}"
""
iex(23)> [one: ~s"#{}", two: ~s"#{}"]
[one: "", two: ""]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant