Yep, statically typed languages tend to have no option but to handle this right. Otherwise, they risk unsoundness: Consider what would happen if you did `val x = "foo"` instead of `val x = 0`.
But there's still no type-level distinction between immutable and mutable bindings, which is why included Scala in the “anything goes” category.