diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index 64b3f724adcd..68ff3101e159 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -210,7 +210,7 @@ class ClassfileParser( if (method) Flags.Method | methodTranslation.flags(jflags) else fieldTranslation.flags(jflags) val name = pool.getName(in.nextChar) - if (!(sflags is Flags.Private) || name == nme.CONSTRUCTOR) { + if (!(sflags.is(Flags.Private) || sflags.is(Flags.Bridge)) || name == nme.CONSTRUCTOR) { val member = ctx.newSymbol( getOwner(jflags), name, sflags, memberCompleter, coord = start) getScope(jflags).enter(member) diff --git a/tests/pos/i6152/A_1.java b/tests/pos/i6152/A_1.java new file mode 100644 index 000000000000..8ca7ce38b25e --- /dev/null +++ b/tests/pos/i6152/A_1.java @@ -0,0 +1,8 @@ +abstract class A { + public abstract Object f(); + + public static abstract class B extends A { + @Override + public abstract String f(); + } +} diff --git a/tests/pos/i6152/Test_2.scala b/tests/pos/i6152/Test_2.scala new file mode 100644 index 000000000000..0e26a3741d61 --- /dev/null +++ b/tests/pos/i6152/Test_2.scala @@ -0,0 +1,8 @@ +class C extends A.B { + def f() = "hello" +} + +object Main extends App { + val c: A = new C + println(c.f()) +}