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

Parser simple expression error recovery change from null to ??? #19103

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

rochala
Copy link
Contributor

@rochala rochala commented Nov 29, 2023

Previously, simpleExpr was recovered as Literal(Constant(null)) which led to some errors in interactive.

Type inference in Scala 3 works on whole chain, thus type vars were inferred as union type of Null because of this very reason. Recovering such errors as unimplementedExpr which has a type of Nothing, solves the issue.

@nicolasstucki nicolasstucki self-assigned this Dec 1, 2023
@nicolasstucki
Copy link
Contributor

@rochala could you squash the commits?

@rochala rochala merged commit 98184f1 into scala:main Dec 6, 2023
19 checks passed
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
@tgodzik tgodzik added the area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools label May 8, 2024
WojciechMazur added a commit that referenced this pull request Jun 25, 2024
…19103)

Previously, simpleExpr was recovered as `Literal(Constant(null))` which
led to some errors in interactive.

Type inference in Scala 3 works on whole chain, thus type vars were
inferred as union type of `Null` because of this very reason. Recovering
such errors as `unimplementedExpr` which has a type of `Nothing`, solves
the issue.
[Cherry-picked 98184f1][modified]
WojciechMazur pushed a commit that referenced this pull request Jun 25, 2024
…19103)

Previously, simpleExpr was recovered as `Literal(Constant(null))` which
led to some errors in interactive.

Type inference in Scala 3 works on whole chain, thus type vars were
inferred as union type of `Null` because of this very reason. Recovering
such errors as `unimplementedExpr` which has a type of `Nothing`, solves
the issue.
WojciechMazur added a commit that referenced this pull request Jun 26, 2024
…to `???`" to LTS (#20790)

Backports #19103 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
rochala added a commit that referenced this pull request Aug 26, 2024
…nimplemented expr (#21438)

We should not emit more errors that came from our error recovery term
trees.

Previously, we've recovered those situations with unimplemented
expression term added in #19103
and before that it was just a `null`
WojciechMazur pushed a commit that referenced this pull request Aug 28, 2024
…nimplemented expr (#21438)

We should not emit more errors that came from our error recovery term
trees.

Previously, we've recovered those situations with unimplemented
expression term added in #19103
and before that it was just a `null`
[Cherry-picked f036195]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants