File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc
library/src/scalaShadowing Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class Driver {
7575 inContext(ictx) {
7676 if ! ctx.settings.YdropComments .value || ctx.mode.is(Mode .ReadComments ) then
7777 ictx.setProperty(ContextDoc , new ContextDocstrings )
78- if Feature .enabledBySetting(nme.Scala2Compat ) && false then // enable when -language:Scala2compat has been purged from the builds
78+ if Feature .enabledBySetting(nme.Scala2Compat ) && false then // TODO: enable
7979 ctx.warning(" -language:Scala2Compat will go away; use -source 3.0-migration instead" )
8080 val fileNames = CompilerCommand .checkUsage(summary, sourcesRequired)
8181 fromTastySetup(fileNames, ctx)
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ object language {
213213 }
214214
215215 /** Where imported, a backwards compatibility mode for Scala2 is enabled */
216- @ deprecated object Scala2Compat
216+ object Scala2Compat
217217
218218 /** Where imported, auto-tupling is disabled */
219219 object noAutoTupling
Original file line number Diff line number Diff line change @@ -783,7 +783,10 @@ object Build {
783783 )
784784
785785 lazy val tastyCoreSettings = Seq (
786- scalacOptions ~= (_ :+ " -source:3.0-migration" )
786+ scalacOptions ~= { old =>
787+ val (language, other) = old.partition(_.startsWith(" -language:" ))
788+ other :+ (language.headOption.map(_ + " ,Scala2Compat" ).getOrElse(" -source:3.0-migration" ))
789+ }
787790 )
788791
789792 lazy val `tasty-core` = project.in(file(" tasty" )).asTastyCore(NonBootstrapped )
You can’t perform that action at this time.
0 commit comments