val pattern match extraction does not understand actual type (with or without type ascription.) #20334
Labels
area:pattern-matching
area:spec
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:bug
Compiler version
3.4.1
Minimized code
https://scastie.scala-lang.org/jOpc8BDCQ7ufoAGjiycSRg 😏
Output
(Warning)
Expectation
I think this is a bug? I expect the lefthand
1
inval Array(1) = Array[Byte](1)
to be inferred asByte
, but even with the type ascription the code generates a warning.The text was updated successfully, but these errors were encountered: