diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeDSL.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/ParallelMatching.scala | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala index 1866fee719..65c1cd7486 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala @@ -119,13 +119,9 @@ trait TreeDSL { def ===(rhs: Tree) = Assign(target, rhs) /** Methods for sequences **/ - //[Martin] I don't understand why the toSequence call is needed. - //It seems redundant. If you want a widening, a Typed (xxx: Sequence) - //would be more efficient. If you want to also deal with arrays, - //it's won't work like this, because arrays will lack the toSequence method. def DROP(count: Int): Tree = if (count == 0) target - else (target DOT nme.drop)(LIT(count)) DOT nme.toSequence + else (target DOT nme.drop)(LIT(count)) /** Casting & type tests -- working our way toward understanding exactly * what differs between the different forms of IS and AS. diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index c5e349bfb7..41949ad8cf 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -976,8 +976,8 @@ trait ParallelMatching extends ast.TreeDSL { case q @ Typed(pp, _) if xIsaY => (alts(pp, q), dummy, None) // never =:= for <equals> // case z: UnApply => (None, None, pass) case z: UnApply => (EmptyTree, dummy, pass) - case _ if erased.xIsaY || xIsaY && !isDef => (alts(EmptyTree, pat), subs, None) // never =:= for <e - case _ if erased.yIsaX || yIsaX || isDef => (EmptyTree, dummy, pass) // subsuming (matched *an + case _ if erased.xIsaY || xIsaY && !isDef => (alts(EmptyTree, pat), subs, None) // never =:= for <equals> + case _ if erased.yIsaX || yIsaX || isDef => (EmptyTree, dummy, pass) // subsuming (matched *and* remaining pattern) case _ => (None, None, pass) // The below fixes bugs 425 and 816 with only the small downside // of causing 60 other tests to fail. |