diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-03-06 16:19:30 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-03-06 16:19:30 +0100 |
commit | 6bcea98c0ecd89efbc106d955345359855860cfa (patch) | |
tree | 498bc296b8fa669e0a0a42c6c6073b5b94b8e735 /src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | |
parent | f536200672177c3e42251477eab9121c2c384d72 (diff) | |
download | scala-6bcea98c0ecd89efbc106d955345359855860cfa.tar.gz scala-6bcea98c0ecd89efbc106d955345359855860cfa.tar.bz2 scala-6bcea98c0ecd89efbc106d955345359855860cfa.zip |
Closes #SI-5554
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala index ea5223e32f..e290a5193c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala @@ -716,7 +716,6 @@ trait ContextErrors { // we have to set the type of tree to ErrorType only in the very last // fallback action that is done in the inference (tracking it manually is error prone). // This avoids entering infinite loop in doTypeApply. - // TODO: maybe we should do the same thing with inferExprAlternative. if (implicitly[Context].reportErrors) setError(tree) } @@ -726,6 +725,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) + // discover last attempt in a similar way as for NoBestMethodAlternativeError + if (implicitly[Context].ambiguousErrors) setError(tree) issueAmbiguousTypeError(pre, best, firstCompeting, AmbiguousTypeError(tree, pos, msg)) } |