Skip to content

Improve error message for inline vals with non-constants #11856

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

Merged
merged 2 commits into from
Mar 23, 2021

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Mar 23, 2021

  • Improve error message for inline vals with non-constants
  • Check type when matching primitive expressions. Make the Expr extractor or Expr.value match a reference to an inline val.

Fixes #11854

We might have a reference to an inline val that is not yet constant folded but is sematically equivalent to the value of its type.

Fixes scala#11854
@nicolasstucki nicolasstucki marked this pull request as ready for review March 23, 2021 14:08
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicolasstucki nicolasstucki merged commit 9396d57 into scala:master Mar 23, 2021
@nicolasstucki nicolasstucki deleted the fix-11854 branch March 23, 2021 15:38
odersky pushed a commit to dotty-staging/dotty that referenced this pull request Mar 24, 2021
Improve error message for `inline val`s with non-constants
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interplay between inline constants and inline parameters
3 participants