File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed
compiler/src/dotty/tools/dotc/typer
tests/neg-custom-args/no-experimental Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -989,7 +989,7 @@ object RefChecks {
989989 checker.traverse(tpe)
990990
991991 private def checkExperimentalAnnots (sym : Symbol )(using Context ): Unit =
992- for annot <- sym.annotations if annot.symbol.isExperimental do
992+ for annot <- sym.annotations if annot.symbol.isExperimental && annot.tree.span.exists do
993993 Feature .checkExperimentalDef(annot.symbol, annot.tree)
994994
995995 /** If @migration is present (indicating that the symbol has changed semantics between versions),
Original file line number Diff line number Diff line change 1- // nopos-error // nopos-error // nopos-error // FIXME redundant due to enum
21import scala .annotation .experimental
32
43@ experimental // error
You can’t perform that action at this time.
0 commit comments