Closed
Description
Currently we're doing what scalac is doing WRT to this issue. Example:
List(1, 2.3) // res: List[Double]
from a user standpoint, this should in a stricter language have been inferred as List[Int | Double]
. In scalac they have a flag for this Ywarn-numeric-widen
. Which is not yet implemented in Dotty.
If we choose not to make inference for this type of construct stricter, then we should definitely implement the Ywarn-numeric-widen
-flag.