Skip to content

It's the wrong trait parameter, Gromit #11344

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

Closed
som-snytt opened this issue Feb 8, 2021 · 0 comments · Fixed by #11410
Closed

It's the wrong trait parameter, Gromit #11344

som-snytt opened this issue Feb 8, 2021 · 0 comments · Fixed by #11410
Assignees
Milestone

Comments

@som-snytt
Copy link
Contributor

Compiler version

➜  dotty git:(master) ./bin/scala -version
Starting scala3 REPL...
Scala compiler version 3.0.0-M4-bin-SNAPSHOT-git-c3e26df -- Copyright 2002-2021, LAMP/EPFL

Minimized code

[success] Total time: 141 s (02:21), completed Feb 8, 2021, 5:11:07 AM
Starting scala3 REPL...
scala> trait Pet(val name: String, rest: String):
     |   def f(suffix: String) = s"$name$suffix$rest"
     |
// defined trait Pet

scala> class Birdie(override val name: String) extends Pet("huh", "more")
// defined class Birdie

scala> Birdie("Polly").f("Cracker")
val res0: String = PollyCrackerhuh

scala>  

Output

// huh not more

Expectation

s/huh/more

Split from #11214 (comment)

@odersky odersky self-assigned this Feb 8, 2021
@odersky odersky added this to the 3.0.0-RC1 milestone Feb 8, 2021
@anatoliykmetyuk anatoliykmetyuk modified the milestones: 3.0.0-RC1, 3.0.0-RC2 Feb 11, 2021
odersky added a commit to dotty-staging/dotty that referenced this issue Feb 13, 2021
As part of the fix, we now also detect missing trait constructors.

Fixes scala#11214
Fixes scala#11344
@odersky odersky linked a pull request Feb 14, 2021 that will close this issue
@Kordyjan Kordyjan modified the milestones: 3.0.0-RC2, 3.0.0 Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants