We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25ad99c commit 5664943Copy full SHA for 5664943
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -835,8 +835,9 @@ object Checking {
835
836
if ctx.owner.is(Package) || ctx.owner.name.startsWith(str.REPL_SESSION_LINE) then
837
def markTopLevelDefsAsExperimental(why: String): Unit =
838
- for sym <- nonExperimentalTopLevelDefs(ctx.owner) do
839
- sym.addAnnotation(ExperimentalAnnotation(s"Added by $why", sym.span))
+ if !ctx.owner.isEmptyPackage then
+ for sym <- nonExperimentalTopLevelDefs(ctx.owner) do
840
+ sym.addAnnotation(ExperimentalAnnotation(s"Added by $why", sym.span))
841
842
unitExperimentalLanguageImports match
843
case imp :: _ => markTopLevelDefsAsExperimental(i"top level $imp")
0 commit comments