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

Elide companion defs to a object extending AnyVal #18451

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

nicolasstucki
Copy link
Contributor

Fixes #18274

@nicolasstucki nicolasstucki marked this pull request as ready for review August 24, 2023 18:58
@iusildra
Copy link
Contributor

You can also extract isValueClass to use it inside of moduleDef, so you can report an error like "A module cannot extends AnyVal". I don't know if it's any better
(And next time I'll check that there are no existing PR for an issue 😆)

Copy link
Member

@mbovel mbovel left a comment

Choose a reason for hiding this comment

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

I don't think we should use the “module”, from the user side this is an “object”, isn't it?

I also suggest to use the existing CanntExtendsAnyVal error.

Proposes changed at dotty-staging#31.

Very sorry the delay to review this PR!

Co-authored-by: Matt Bovel <matthieu@bovel.net>
@nicolasstucki nicolasstucki merged commit f62429b into scala:main Oct 18, 2023
16 checks passed
@nicolasstucki nicolasstucki deleted the fix-#18274 branch October 18, 2023 09:50
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
WojciechMazur added a commit that referenced this pull request Jun 22, 2024
…TS (#20722)

Backports #18451 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
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.

Misleading AnyVal object error message
4 participants