We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f2bb231 + ae2d13a commit 8feb596Copy full SHA for 8feb596
compiler/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -990,7 +990,7 @@ object SymDenotations {
990
*/
991
private def companionNamed(name: TypeName)(implicit ctx: Context): Symbol =
992
if (owner.isClass)
993
- owner.info.decl(name).suchThat(_.isCoDefinedWith(symbol)).symbol
+ owner.unforcedDecls.lookup(name).suchThat(_.isCoDefinedWith(symbol)).symbol
994
else if (!owner.exists || ctx.compilationUnit == null)
995
NoSymbol
996
else if (!ctx.compilationUnit.tpdTree.isEmpty)
tests/pos-java-interop/i4357/B_1.java
@@ -0,0 +1,4 @@
1
+public class B_1 extends A<B_1.C> {
2
+ public static class C {};
3
+}
4
+class A<T> {}
tests/pos-java-interop/i4357/Test_2.scala
@@ -0,0 +1,3 @@
+object Test {
+ val b: B_1 = new B_1()
0 commit comments