Skip to content

It's the wrong trait parameter, Gromit #11344

@som-snytt

Description

@som-snytt

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions