We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f9a2e2 commit 8fcd334Copy full SHA for 8fcd334
compiler/src/dotty/tools/dotc/transform/patmat/Space.scala
@@ -374,7 +374,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
374
// cannot use WildcardType for Array[_], due to that
375
// Array[WildcardType] <: Array[Array[WildcardType]]
376
// see tests/patmat/t2425.scala
377
- TypeErasure.erasure(tp)
+ tp
378
case tref: TypeRef if isPatternTypeSymbol(tref.typeSymbol) =>
379
WildcardType(tref.underlying.bounds)
380
case _ => mapOver(tp)
tests/patmat/i6197b.scala
@@ -0,0 +1,4 @@
1
+def foo(x: Option[Array[String]]) = x match {
2
+ case Some(x) =>
3
+ case None =>
4
+}
0 commit comments