Scala seems to behave like Java when it comes to magically transforming primitives:
val a: Int = 1 val b: Double = 2.3 println(a + b)
Most often it was a source of errors in my code. Is there a way to disable these implicit conversions so that my example leads to a warning / error compilation? I would love to write
print(a.toDouble + b) println(Math.max(a.toDouble, b))
every time I need such a transformation.
source share