diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-22 12:14:11 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-22 12:14:11 +0200 |
commit | d8b83375379f35c90ca980ef6f1467937cc9764a (patch) | |
tree | 625501a35adb02794e9079dab665a3fedfa514d6 /src/compiler | |
parent | 1ddc9358f551f4586adb1a540e0255fd0e5a33c9 (diff) | |
download | scala-d8b83375379f35c90ca980ef6f1467937cc9764a.tar.gz scala-d8b83375379f35c90ca980ef6f1467937cc9764a.tar.bz2 scala-d8b83375379f35c90ca980ef6f1467937cc9764a.zip |
Last minor cleanup
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala index 9aa1b1b9c2..2d6e18c037 100644 --- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala +++ b/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 |