-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
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)