Skip to content
New issue

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

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

Already on GitHub? # to your account

Better error messages for missing commas and more #18785

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 29, 2023

Three measures:

  1. Classify an id as infix operator only if following can start an operand
  2. Detect and report spread operators in illegal positions
  3. Mention , in addition to ) or ] in error messages when a , could have been missing

Fixes #18734

Also, detect and report spread operators in illegal positions
In interactive mode the token after an operator might not yet exist, so we
should disregard that info when deciding whether we see an infix operator or
not.
@odersky
Copy link
Contributor Author

odersky commented Oct 29, 2023

@rochala Can you give this a review? There are some interactions with pc.

@odersky odersky merged commit 10a2b83 into scala:main Oct 30, 2023
18 checks passed
@odersky odersky deleted the fix-18734 branch October 30, 2023 12:54
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 23, 2024
…20746)

Backports #18785 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error when missing a comma in Apply args
3 participants