summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-10-30 09:07:28 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-10-30 09:07:28 -0700
commitc38235fd44f1ccb280e31a2f34f58deb59c5b2ee (patch)
tree39525d55b60dfa4c9092741c76235ce20e397484 /src/compiler/scala/tools/nsc/typechecker/Implicits.scala
parent9b8d108ed7cb1a049e4e8500b6896e9554328aab (diff)
parent212c55d5bc3e87e3b1940502d55be9c2dcbf9326 (diff)
downloadscala-c38235fd44f1ccb280e31a2f34f58deb59c5b2ee.tar.gz
scala-c38235fd44f1ccb280e31a2f34f58deb59c5b2ee.tar.bz2
scala-c38235fd44f1ccb280e31a2f34f58deb59c5b2ee.zip
Merge pull request #3084 from retronym/topic/opt
Microoptimization in implicit search
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index c19d861d23..987a3d2202 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -216,7 +216,8 @@ trait Implicits {
case NullaryMethodType(restpe) =>
containsError(restpe)
case mt @ MethodType(_, restpe) =>
- (mt.paramTypes exists typeIsError) || containsError(restpe)
+ // OPT avoiding calling `mt.paramTypes` which creates a new list.
+ (mt.params exists symTypeIsError) || containsError(restpe)
case _ =>
tp.isError
}