summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
index 21b80df735..5f8ae240cc 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
@@ -1013,11 +1013,10 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
case SingleType(_, sym) => and(equalsTest(CODE.REF(sym), testedBinder), typeTest(testedBinder, expectedTp.widen))
// must use == to support e.g. List() == Nil
case ThisType(sym) if sym.isModule => and(equalsTest(CODE.REF(sym), testedBinder), typeTest(testedBinder, expectedTp.widen))
- case ConstantType(const) => equalsTest(expTp(Literal(const)), testedBinder)
-
- case ThisType(sym) => eqTest(expTp(This(sym)), testedBinder)
case ConstantType(Constant(null)) if testedBinder.info.widen <:< AnyRefClass.tpe
=> eqTest(expTp(CODE.NULL), testedBinder)
+ case ConstantType(const) => equalsTest(expTp(Literal(const)), testedBinder)
+ case ThisType(sym) => eqTest(expTp(This(sym)), testedBinder)
// TODO: verify that we don't need to special-case Array
// I think it's okay: