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 de53e52 commit 8923efcCopy full SHA for 8923efc
compiler/src/dotty/tools/dotc/typer/FrontEnd.scala
@@ -70,7 +70,7 @@ class FrontEnd extends Phase {
70
private def firstTopLevelDef(trees: List[tpd.Tree])(implicit ctx: Context): Symbol = trees match {
71
case PackageDef(_, defs) :: _ => firstTopLevelDef(defs)
72
case Import(_, _) :: defs => firstTopLevelDef(defs)
73
- case (tree @ TypeDef(_, _)) :: _ => tree.symbol
+ case (tree @ TypeDef(_, _)) :: _ => if (tree.hasType) tree.symbol else NoSymbol
74
case _ => NoSymbol
75
}
76
tests/neg/i2292.scala
@@ -0,0 +1,3 @@
1
+package + // error
2
+
3
+class Foo
0 commit comments