Because there is an expected type of the expressio...
# announcements
i
Because there is an expected type of the expression being returned, namely
A.Details<Number>
. When you invoke Details constructor in that expression its type argument is inferred as
Number
, so that is an equivalent of
return A.Details<Number>(1.0 as Number)