diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/ParallelMatching.scala | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index 5df7b3736d..bf7f777bfa 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -874,16 +874,27 @@ object Rep { */ val stpe = if (o.tpe.termSymbol.isModule) { - singleType(o.tpe.prefix, o.symbol) - } else - singleType(NoPrefix, o.symbol) - + singleType(o.tpe.prefix, o.symbol) + } else { + singleType(NoPrefix, o.symbol) // equals-check + } val p = Ident(nme.WILDCARD) setType stpe val q = Typed(p, TypeTree(stpe)) setType stpe pats = q::pats } else pats = o::pats + case o @ Select(_,_) => + val stpe = + if (o.tpe.termSymbol.isModule) { + singleType(o.tpe.prefix, o.symbol) + } else { + singleType(NoPrefix, o.symbol) // equals-check + } + val p = Ident(nme.WILDCARD) setType stpe + val q = Typed(p, TypeTree(stpe)) setType stpe + pats = q::pats + case ua @ UnApply(Apply(fn, _), arg) => fn.tpe match { case MethodType(List(argtpe,_*),_) => @@ -898,8 +909,10 @@ object Rep { //Console.println(o) //val stpe = singleType(NoPrefix, o.symbol) val stpe = - if (o.tpe./*?term?*/symbol.isModule) singleType(o.tpe.prefix, o.symbol) - else mkThisType(o.symbol) + if (o.tpe.termSymbol.isModule) singleType(o.tpe.prefix, o.symbol) + else { + singleType(NoPrefix, o.symbol) // equals-check + } val p = Ident(nme.WILDCARD) setType stpe val q = Typed(p, TypeTree(stpe)) setType stpe pats = q::pats @@ -1133,6 +1146,7 @@ object Rep { Equals(gen.mkAttributedRef(tpe.termSymbol), scrutineeTree) // object } else { //Console.print("111 ??") + //Console.println("tpe.prefix "+tpe.prefix) //Console.println("tpe stable "+tpe.isStable) //Console.println("tpe prefix stable "+tpe.prefix.isStable) //val x = Equals(Apply(gen.mkAttributedRef(tpe./*?term?*/symbol), List()), scrutineeTree) |