Permalink
Browse files

Last minor cleanup

  • Loading branch information...
hubertp committed May 22, 2012
1 parent 1ddc935 commit d8b83375379f35c90ca980ef6f1467937cc9764a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -691,6 +691,7 @@ trait ContextErrors {
}
// side-effect on the tree, break the overloaded type cycle in infer
@inline
private def setErrorOnLastTry(lastTry: Boolean, tree: Tree) = if (lastTry) setError(tree)
def NoBestMethodAlternativeError(tree: Tree, argtpes: List[Type], pt: Type, lastTry: Boolean) = {
@@ -701,7 +702,6 @@ trait ContextErrors {
// fallback action that is done in the inference.
// This avoids entering infinite loop in doTypeApply.
setErrorOnLastTry(lastTry, tree)
//if (implicitly[Context].reportErrors) setError(tree)
}
def AmbiguousMethodAlternativeError(tree: Tree, pre: Type, best: Symbol,
@@ -712,8 +712,8 @@ trait ContextErrors {
"argument types " + argtpes.mkString("(", ",", ")") +
(if (pt == WildcardType) "" else " and expected result type " + pt)
val (pos, msg) = ambiguousErrorMsgPos(tree.pos, pre, best, firstCompeting, msg0)
setErrorOnLastTry(lastTry, tree)
issueAmbiguousTypeError(pre, best, firstCompeting, AmbiguousTypeError(tree, pos, msg))
setErrorOnLastTry(lastTry, tree)
} else setError(tree) // do not even try further attempts because they should all fail
// even if this is not the last attempt (because of the SO's possibility on the horizon)
@@ -726,8 +726,8 @@ trait ContextErrors {
def AmbiguousExprAlternativeError(tree: Tree, pre: Type, best: Symbol, firstCompeting: Symbol, pt: Type, lastTry: Boolean) = {
val (pos, msg) = ambiguousErrorMsgPos(tree.pos, pre, best, firstCompeting, "expected type " + pt)
setErrorOnLastTry(lastTry, tree)
issueAmbiguousTypeError(pre, best, firstCompeting, AmbiguousTypeError(tree, pos, msg))
setErrorOnLastTry(lastTry, tree)
}
// checkBounds

0 comments on commit d8b8337

Please sign in to comment.