Compiler version
3.1.2
Minimized code
def `=`: String = "="
def `+`: String = "+"
val withEq: String = `=` + "3"
val withPlus: String = `+` + "3"
Output
Compile error on the last line:
; expected but string constant found
See https://scastie.scala-lang.org/WCnbXR7RRzOuc8zYkrlxUQ for a "live" reproduction
Expectation
Either a compile error for both withEq and withPlus, or none, but this seems inconsistent.