From 910e5a0ceff9264c27989257f4b793ddf2322f4a Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 25 Feb 2013 23:27:42 -0800 Subject: Reconcile definitions of stability. --- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/compiler/scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index c0391448d1..c7a4d44588 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -149,7 +149,7 @@ trait Implicits { class SearchResult(val tree: Tree, val subst: TreeTypeSubstituter) { override def toString = "SearchResult(%s, %s)".format(tree, if (subst.isEmpty) "" else subst) - + def isFailure = false def isAmbiguousFailure = false final def isSuccess = !isFailure @@ -158,7 +158,7 @@ trait Implicits { lazy val SearchFailure = new SearchResult(EmptyTree, EmptyTreeTypeSubstituter) { override def isFailure = true } - + lazy val AmbiguousSearchFailure = new SearchResult(EmptyTree, EmptyTreeTypeSubstituter) { override def isFailure = true override def isAmbiguousFailure = true @@ -198,15 +198,7 @@ trait Implicits { tp.isError } - /** Todo reconcile with definition of stability given in Types.scala */ - private def isStable(tp: Type): Boolean = tp match { - case TypeRef(pre, sym, _) => - sym.isPackageClass || - sym.isModuleClass && isStable(pre) /*|| - sym.isAliasType && isStable(tp.normalize)*/ - case _ => tp.isStable - } - def isStablePrefix = isStable(pre) + def isStablePrefix = pre.isStable override def equals(other: Any) = other match { case that: ImplicitInfo => -- cgit v1.2.3