Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Check trivial trait args [ci: last-only] #11034

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

Draft
wants to merge 3 commits into
base: 2.13.x
Choose a base branch
from

Conversation

som-snytt
Copy link
Contributor

@scala-jenkins scala-jenkins added this to the 2.13.17 milestone Mar 31, 2025
@som-snytt som-snytt force-pushed the issue/6805-trait-parameters branch from 5edb059 to 720c1cd Compare March 31, 2025 06:32
@lrytz
Copy link
Member

lrytz commented Mar 31, 2025

Scala 3 also allows the empty argument list, so maybe it's not worth cleaning that up in Scala 2?

@som-snytt
Copy link
Contributor Author

som-snytt commented Mar 31, 2025

TIL. I'll try to understand the Scala 3 feature well enough to know if that is plain wrong.

Edit: haven't gotten around to that, but for now I did allow just the new syntax

new T() {} // looks like Java, and arguably they are the parens to the anon class

Should be a lint warning.

Before committing to this PR, what I really wanted to do is try backporting trait params. That way, I'll understand how trait params work (until I forget again).

@som-snytt som-snytt force-pushed the issue/6805-trait-parameters branch 4 times, most recently from 41aafb7 to 831b71d Compare April 1, 2025 18:57
@som-snytt som-snytt changed the title Check trivial trait args Check trivial trait args [ci: last-only] Apr 4, 2025
@som-snytt som-snytt force-pushed the issue/6805-trait-parameters branch from 831b71d to dee9cac Compare April 4, 2025 23:20
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.

Compiler allows empty argument lists for traits
3 participants