File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
compiler/src/dotty/tools/dotc/transform/patmat
tests/neg-custom-args/isInstanceOf Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -466,9 +466,7 @@ class SpaceEngine(implicit ctx: Context) extends SpaceLogic {
466
466
case tp @ RefinedType (parent, _, _) =>
467
467
erase(parent)
468
468
case tref : TypeRef if isPatternTypeSymbol(tref.typeSymbol) =>
469
- if (inArray) tref.underlying else WildcardType (tref.underlying.bounds)
470
- case mt : MethodType =>
471
- mt.derivedLambdaType(mt.paramNames, mt.paramInfos.map(info => erase(info)), erase(mt.resType))
469
+ if (inArray) tref.underlying else WildcardType
472
470
case _ => tp
473
471
}
474
472
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ sealed trait Exp[T]
2
2
case class Fun [A , B ](f : Exp [A => B ]) extends Exp [A => B ]
3
3
4
4
class Test {
5
- def eval [T ](e : Exp [T ]) = e match {
5
+ def eval [T ](e : Exp [T ]) = e match { // error
6
6
case Fun (x : Fun [Int , Double ]) => ??? // error
7
7
case Fun (x : Exp [Int => String ]) => ??? // error
8
8
}
You can’t perform that action at this time.
0 commit comments