From 0ffb0708fa5b154f53e35973d99239a94af755ca Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 17 Apr 2010 19:44:24 +0000 Subject: Fix and test case for forwarder duplicate bug. --- src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 5318c76311..dc193b03db 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -851,7 +851,7 @@ abstract class GenJVM extends SubComponent { def addForwarders(jclass: JClass, module: Symbol) { addForwarders(jclass, module, _ => true) } def addForwarders(jclass: JClass, module: Symbol, cond: (Symbol) => Boolean) { def conflictsIn(cls: Symbol, name: Name) = - cls.info.nonPrivateMembers.exists(_.name == name) + cls.info.members exists (_.name == name) /** List of parents shared by both class and module, so we don't add forwarders * for methods defined there - bug #1804 */ @@ -874,7 +874,7 @@ abstract class GenJVM extends SubComponent { atPhase(currentRun.picklerPhase) ( m.owner != definitions.ObjectClass && m.isMethod - && !m.hasFlag(Flags.CASE | Flags.PROTECTED | Flags.DEFERRED | Flags.SPECIALIZED) + && !m.hasFlag(Flags.CASE | Flags.PRIVATE | Flags.PROTECTED | Flags.DEFERRED | Flags.SPECIALIZED) && !m.isConstructor && !m.isStaticMember && !(m.owner == definitions.AnyClass) -- cgit v1.2.3