There is a subtle difference between
val x = e: T
and
val x: T = e
It is almost always the case that one requires the former style of
annotation
in ATS.
The latter only checks that the type of e is a subtype of T.
There is a subtle difference between
val x = e: T
and
val x: T = e
It is almost always the case that one requires the former style of
annotation
in ATS.
The latter only checks that the type of e is a subtype of T.