Here is my discovery. I've found that in Scala
I can simply write such expression:
val n: Int = (((2: Int): Int): Int): Int
and it'll 100% valid. But I have no idea why Scala creators did that? What is the point of this semantic? And are there some reasons for that kind of weirdness?
PS
I can assume that such approach is used for type inference
to help compiler figure out what is going on. Or maybe there are some other cases?