Open
Description
Reproduction steps
➜ ~ scala
Welcome to Scala 2.13.8 (OpenJDK 64-Bit Server VM, Java 18.0.1.1).
Type in expressions for evaluation. Or try :help.
scala> class C(var c: Int) ; class D(c: Int) extends C(c) { def f = c }
class C
class D
scala> val d = new D(42); d.f; d.c = 27; d.f
val d: D = D@6f5d0190
// mutated d.c
val res0: Int = 42
Problem
There are two invocations d.f
but only one value is printed. (Scala 3 REPL prints both.)
Noticed at scala/scala3#15764 (comment) to great embarrassment and consternation.