diff options
author | Martin Odersky <odersky@gmail.com> | 2010-04-23 13:11:03 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-04-23 13:11:03 +0000 |
commit | 340080290322fc1c24cb6b35a04fbb23497a17f6 (patch) | |
tree | e09da767eb9557d400eeb32ad11b958cfbef7bce /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | 42ebea46c7e27430131cebe8169955d34571e681 (diff) | |
download | scala-340080290322fc1c24cb6b35a04fbb23497a17f6.tar.gz scala-340080290322fc1c24cb6b35a04fbb23497a17f6.tar.bz2 scala-340080290322fc1c24cb6b35a04fbb23497a17f6.zip |
Fixed potential duplicate error annotation "Err...
Fixed potential duplicate error annotation "Error occurred in an
application involving default arguments."
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 1a3f270c9a..879592c444 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2313,7 +2313,8 @@ trait Typers { self: Analyzer => val (allArgs, missing) = addDefaults(args, qual, targs, previousArgss, params, fun.pos.focus, context) if (allArgs.length == formals.length) { // useful when a default doesn't match parameter type, e.g. def f[T](x:T="a"); f[Int]() - context.diagnostic = "Error occurred in an application involving default arguments." :: context.diagnostic + val note = "Error occurred in an application involving default arguments." + if (!(context.diagnostic contains note)) context.diagnostic = note :: context.diagnostic doTypedApply(tree, if (blockIsEmpty) fun else fun1, allArgs, mode, pt) } else { tryTupleApply.getOrElse { |