diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index 9af3319c85e5..80377807dedc 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -363,7 +363,7 @@ class ClassfileParser( accept('.') val name = subName(c => c == ';' || c == '<' || c == '.').toTypeName val clazz = tpe.member(name).symbol - tpe = processClassType(processInner(clazz.typeRef)) + tpe = processClassType(processInner(TypeRef(tpe, clazz))) } accept(';') tpe diff --git a/tests/pos/i5655/J_1.java b/tests/pos/i5655/J_1.java new file mode 100644 index 000000000000..815bfaa2cd26 --- /dev/null +++ b/tests/pos/i5655/J_1.java @@ -0,0 +1,11 @@ +public class J_1{ + public class A{ + public class B{} + } + A.B m(){ + J_1 j = new J_1(); + A a = j.new A<>(); + A.B b = a.new B<>(); + return b; + } +} \ No newline at end of file diff --git a/tests/pos/i5655/S_2.scala b/tests/pos/i5655/S_2.scala new file mode 100644 index 000000000000..9e85d0183911 --- /dev/null +++ b/tests/pos/i5655/S_2.scala @@ -0,0 +1,6 @@ +object O { + def main(args: Array[String]) = { + val j = new J_1 + val ab: J_1#A[String]#B[String] = j.m() + } +} \ No newline at end of file