diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-03-05 21:13:28 +0900 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-03-08 10:38:39 +0100 |
commit | 19fad7a34125f975a7832d125b9868500546af7a (patch) | |
tree | 1d54900dc2d65df6ce345f22ff3b46b68d3b9263 /compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala | |
parent | ad4a6f4251d9b664029dd37cf252d85531ac694c (diff) | |
download | dotty-19fad7a34125f975a7832d125b9868500546af7a.tar.gz dotty-19fad7a34125f975a7832d125b9868500546af7a.tar.bz2 dotty-19fad7a34125f975a7832d125b9868500546af7a.zip |
Remove uses of Collections from scala-reflect
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala index 7c49e68dd..7576ccc05 100644 --- a/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -30,8 +30,6 @@ import dotty.tools.dotc.util.Positions.Position import dotty.tools.dotc.core.Decorators._ import dotty.tools.dotc.core.Flags -import scala.reflect.internal.util.Collections - /** This transform eliminates patterns. Right now it's a dummy. * Awaiting the real pattern matcher. * elimRepeated is required @@ -166,7 +164,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer { } def emitValDefs: List[ValDef] = { - Collections.map2(lhs, rhs)((symbol, tree) => ValDef(symbol.asTerm, tree.ensureConforms(symbol.info))) + (lhs, rhs).zipped.map((symbol, tree) => ValDef(symbol.asTerm, tree.ensureConforms(symbol.info))) } } object NoRebindings extends Rebindings(Nil, Nil) @@ -609,7 +607,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer { // only store binders actually used val (subPatBindersStored, subPatRefsStored) = stored.filter{case (b, _) => usedBinders(b)}.unzip - Block(Collections.map2(subPatBindersStored.toList, subPatRefsStored.toList)((bind, ref) => { + Block((subPatBindersStored.toList, subPatRefsStored.toList).zipped.map((bind, ref) => { // required in case original pattern had a more precise type // eg case s@"foo" => would be otherwise translated to s with type String instead of String("foo") def refTpeWiden = ref.tpe.widen |