summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-04-11 16:22:28 +0000
committerMartin Odersky <odersky@gmail.com>2006-04-11 16:22:28 +0000
commite3fc3506c7c918aba5cc7c3baabca95de8f6ac4c (patch)
tree67c1ec643f9b418914e0f82341785cd7860d77d1 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parenta0c48ce649c3d320623a3369b8ade2665b71f613 (diff)
downloadscala-e3fc3506c7c918aba5cc7c3baabca95de8f6ac4c.tar.gz
scala-e3fc3506c7c918aba5cc7c3baabca95de8f6ac4c.tar.bz2
scala-e3fc3506c7c918aba5cc7c3baabca95de8f6ac4c.zip
1. Allowed local implicits
2. Small change in syntax to make postfix operators more robust 3. Suppresses duplicate and redundant error messages 4. Improve `bad signature' diagnostics
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index f24d2a21a4..ef1b48aeef 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -183,8 +183,10 @@ trait Contexts requires Analyzer {
"both " + sym1 + sym1.locationString + " of type " + pre.memberType(sym1) +
"\nand " + sym2 + sym2.locationString + " of type " + pre.memberType(sym2) +
"\nmatch " + rest);
- if (reportAmbiguousErrors) unit.error(pos, msg)
- else throw new TypeError(msg);
+ if (reportAmbiguousErrors) {
+ if (!pre.isErroneous && !sym1.isErroneous && !sym2.isErroneous)
+ unit.error(pos, msg)
+ } else throw new TypeError(msg);
}
def outerContext(clazz: Symbol): Context = {