Open
Description
Compiler version
3.4.1
Minimized code
val Array(1: Byte) = Array[Byte](1)
https://scastie.scala-lang.org/jOpc8BDCQ7ufoAGjiycSRg 😏
Output
(Warning)
pattern's type (1 : Int) does not match the right hand side expression's type Byte […]
Expectation
I think this is a bug? I expect the lefthand 1
in val Array(1) = Array[Byte](1)
to be inferred as Byte
, but even with the type ascription the code generates a warning.