File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/typer
sbt-test/java-compat/moduleInfo Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -806,10 +806,11 @@ object Checking {
806806 def checkAndAdaptExperimentalImports (trees : List [Tree ])(using Context ): Unit =
807807 def nonExperimentalTopLevelDefs (pack : Symbol ): Iterator [Symbol ] =
808808 def isNonExperimentalTopLevelDefinition (sym : Symbol ) =
809- ! sym.isExperimental
809+ sym.isDefinedInCurrentRun
810810 && sym.source == ctx.compilationUnit.source
811811 && ! sym.isConstructor // not constructor of package object
812812 && ! sym.is(Package ) && ! sym.name.isPackageObjectName
813+ && ! sym.isExperimental
813814
814815 pack.info.decls.toList.iterator.flatMap: sym =>
815816 if sym.isClass && (sym.is(Package ) || sym.isPackageObject) then
Original file line number Diff line number Diff line change 1+ // Previously, we crashed trying to parse module-info.class in the empty package.
2+ class A
Original file line number Diff line number Diff line change 1+ scalaVersion := sys.props(" plugin.scalaVersion" )
2+
3+ scalacOptions ++= Seq (
4+ " -experimental"
5+ )
Original file line number Diff line number Diff line change 1+ > compile
You can’t perform that action at this time.
0 commit comments