diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-03-06 11:04:14 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-03-06 11:10:09 +0100 |
commit | 4f99c2e589164c300d3e86c0de5a0d3ca9efd3f7 (patch) | |
tree | d74047b56d5a8ed4694e522afd9ea92b65550f80 /src/compiler | |
parent | f536200672177c3e42251477eab9121c2c384d72 (diff) | |
download | scala-4f99c2e589164c300d3e86c0de5a0d3ca9efd3f7.tar.gz scala-4f99c2e589164c300d3e86c0de5a0d3ca9efd3f7.tar.bz2 scala-4f99c2e589164c300d3e86c0de5a0d3ca9efd3f7.zip |
Closes #5553, review by dragos
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Infer.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index e1aa8b46eb..277c5b45d9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1385,9 +1385,10 @@ trait Infer { case _ => } } + // todo: missing test case NoBestExprAlternativeError(tree, pt) } else if (!competing.isEmpty) { - if (secondTry) NoBestExprAlternativeError(tree, pt) + if (secondTry) { NoBestExprAlternativeError(tree, pt); setError(tree) } else if (!pt.isErroneous) AmbiguousExprAlternativeError(tree, pre, best, competing.head, pt) } else { // val applicable = alts1 filter (alt => |