diff options
author | Paul Phillips <paulp@improving.org> | 2011-10-28 02:43:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-10-28 02:43:59 +0000 |
commit | 4505c2b05c622e5438dddb9a3a9b3296819baaa0 (patch) | |
tree | d6b751af547228aa353919f27ec7f35f17a46a84 /src | |
parent | 09188cd820c29894d046dbd5497afc68932e60f8 (diff) | |
download | scala-4505c2b05c622e5438dddb9a3a9b3296819baaa0.tar.gz scala-4505c2b05c622e5438dddb9a3a9b3296819baaa0.tar.bz2 scala-4505c2b05c622e5438dddb9a3a9b3296819baaa0.zip |
Better report on missing methods.
Discovered an overloaded method with multiple unimplemented variants
only had one listed. Fixed, no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index a5053eb559..c3c353385c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -523,9 +523,10 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R // Group missing members by the name of the underlying symbol, // to consolidate getters and setters. val grouped = missing groupBy (sym => analyzer.underlyingSymbol(sym).name) - val missingMethods = grouped.toList map { - case (name, sym :: Nil) => sym - case (name, syms) => syms.sortBy(!_.isGetter).head + val missingMethods = grouped.toList flatMap { + case (name, syms) => + if (syms exists (_.isSetter)) syms filterNot (_.isGetter) + else syms } def stubImplementations: List[String] = { |