We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6706d1 commit 234f3c1Copy full SHA for 234f3c1
src/dotty/tools/dotc/core/SymDenotations.scala
@@ -885,7 +885,7 @@ object SymDenotations {
885
*/
886
private def companionNamed(name: TypeName)(implicit ctx: Context): Symbol =
887
if (owner.isClass)
888
- owner.info.decl(name).suchThat(_.isCoDefinedWith(symbol)).symbol
+ owner.info.decl(name).suchThat(x => x.isCoDefinedWith(symbol) && x.isClass && x.symbol.isClass).symbol
889
else if (!owner.exists || ctx.compilationUnit == null)
890
NoSymbol
891
else if (!ctx.compilationUnit.tpdTree.isEmpty)
0 commit comments