I read a Scala tutorial and explains that all statements are actually method calls. So 1 * 2 really:
scala> (1).*(2) res1: Int = 2
To find out what will happen, I ran:
scala> 1.*(2) warning: there were 1 deprecation warning(s); re-run with -deprecation for details res2: Double = 2.0
So, I run it again with the deprecation flag, and I get:
scala> 1.*(2) <console>:1: warning: This lexical syntax is deprecated. From scala 2.11, a dot will only be considered part of a number if it is immediately followed by a digit. 1.*(2)
Can someone please explain this warning to me, and also explain to me what the parentheses around 1 for scala> (1).*(2) .
scala
sunrize920
source share