Open
Description
Compiler version
3.1.3
Minimized code and Output
$ scala
Welcome to Scala 3.1.3 (17.0.4, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> 42D + "hello"
there was 1 deprecation warning; re-run with -deprecation for details
1 warning found
val res0: String = 42.0hello
scala>
Expectation
Beginners are frustrated by this warning and think it is an error but dont understand why and dont know what deprecation means nor how to re-run, so this is an UX bug IMHO.
:settings -deprecation
should be on by default in REPL so that:
scala> 42D + "hello"
1 warning found
-- Deprecation Warning: -------------------------------------------------------------------------------------------------------
1 |42D + "hello"
|^^^^^
|method + in class Double is deprecated since 2.13.0: Adding a number and a String is deprecated. Use the string interpolation `s"$num$str"`
val res1: String = 42.0hello