summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-04-24 07:51:19 -0700
committerPaul Phillips <paulp@improving.org>2012-04-25 09:09:29 -0700
commitc22ec635c75170d1ac1cb0074e532b4186eed845 (patch)
tree44713230e43a29b34bb87a41cc1719334fe32391 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent5cf9499731255078de62c8f3704fa596b564bf0e (diff)
downloadscala-c22ec635c75170d1ac1cb0074e532b4186eed845.tar.gz
scala-c22ec635c75170d1ac1cb0074e532b4186eed845.tar.bz2
scala-c22ec635c75170d1ac1cb0074e532b4186eed845.zip
Some long overdue conveniences.
Not just conveniences though. One of the clearest statements made by profiling is that collections methods of the form of the enclosed flatCollect are materially faster than the alternatives.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 1414424a0b..a956b9a177 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3289,14 +3289,12 @@ trait Typers extends Modes with Adaptations with Taggings with PatMatVirtualiser
case tp => tp
}
- (hidden map { s =>
- // Hanging onto lower bound in case anything interesting
- // happens with it.
- (s, s.existentialBound match {
- case TypeBounds(lo, hi) => TypeBounds(lo, hiBound(s))
- case _ => hiBound(s)
- })
- }).toMap
+ // Hanging onto lower bound in case anything interesting
+ // happens with it.
+ mapFrom(hidden)(s => s.existentialBound match {
+ case TypeBounds(lo, hi) => TypeBounds(lo, hiBound(s))
+ case _ => hiBound(s)
+ })
}
/** Given a set `rawSyms` of term- and type-symbols, and a type