summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-11 15:05:10 -0700
committerPaul Phillips <paulp@improving.org>2012-10-11 15:48:53 -0700
commitf61cd63442089c79efd67fbe1b0a5c7de953d35a (patch)
tree36bb057ec8d0c45f73001bf5ec4c3b2ddabba1cc /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent9bedb07350686f18bf307ac18503d8efb49db746 (diff)
downloadscala-f61cd63442089c79efd67fbe1b0a5c7de953d35a.tar.gz
scala-f61cd63442089c79efd67fbe1b0a5c7de953d35a.tar.bz2
scala-f61cd63442089c79efd67fbe1b0a5c7de953d35a.zip
Removed redundant containsUncheckable.
Like the comment said: "TODO: at the very least, reduce duplication wrt checkCheckable" I went with the very most, eliminating it.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 85005c23c3..a262438ae0 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3362,10 +3362,10 @@ trait Typers extends Modes with Adaptations with Tags {
// if at least one of the types in an intersection is checkable, use the checkable ones
// this avoids problems as in run/matchonseq.scala, where the expected type is `Coll with scala.collection.SeqLike`
// Coll is an abstract type, but SeqLike of course is not
- case RefinedType(parents, _) if (parents.length >= 2) && (parents.exists(tp => !infer.containsUnchecked(tp))) =>
+ case RefinedType(ps, _) if ps.length > 1 && (ps exists infer.isCheckable) =>
None
- case ptCheckable if infer.containsUnchecked(ptCheckable) =>
+ case ptCheckable if infer isUncheckable ptCheckable =>
val classTagExtractor = resolveClassTag(pos, ptCheckable)
if (classTagExtractor != EmptyTree && unapplyMember(classTagExtractor.tpe) != NoSymbol)