Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ object SymDenotations {
*/
private def companionNamed(name: TypeName)(implicit ctx: Context): Symbol =
if (owner.isClass)
owner.info.decl(name).suchThat(_.isCoDefinedWith(symbol)).symbol
owner.unforcedDecls.lookup(name).suchThat(_.isCoDefinedWith(symbol)).symbol
else if (!owner.exists || ctx.compilationUnit == null)
NoSymbol
else if (!ctx.compilationUnit.tpdTree.isEmpty)
Expand Down
4 changes: 4 additions & 0 deletions tests/pos-java-interop/i4357/B_1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public class B_1 extends A<B_1.C> {
public static class C {};
}
class A<T> {}
3 changes: 3 additions & 0 deletions tests/pos-java-interop/i4357/Test_2.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
object Test {
val b: B_1 = new B_1()
}