Scala version: 2.13.16
#Reproduction
class IntBox(val x :Int) {
def plus(other :IntBox) :String = toString" + " + other.x
override def toString = x.toString
}
println(new IntBox(2).plus(new IntBox(2)))
#Problem
StringContext(ArraySeq( + ))2
This is almost certainly not what the programmer wanted. I propose it triggers a compiler warning about a missing +.
Scala version: 2.13.16
#Reproduction
#Problem
This is almost certainly not what the programmer wanted. I propose it triggers a compiler warning about a missing
+.