Skip to content

Commit 37f1203

Browse files
committed
Drop Scala2compat language feature
It's been replaced a while ago by `-source 3.0-migration`
1 parent 2eac9df commit 37f1203

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ 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) then
79-
report.warning("-language:Scala2Compat will go away; use -source 3.0-migration instead")
8078
val fileNames = CompilerCommand.checkUsage(summary, sourcesRequired)
8179
fromTastySetup(fileNames, ctx)
8280
}

compiler/src/dotty/tools/dotc/config/Feature.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ object Feature:
8282
case Some(v) => v
8383
case none => sourceVersionSetting
8484

85-
def migrateTo3(using Context): Boolean =
86-
sourceVersion == `3.0-migration` || enabledBySetting(nme.Scala2Compat)
85+
def migrateTo3(using Context): Boolean = sourceVersion == `3.0-migration`
8786

8887
/** If current source migrates to `version`, issue given warning message
8988
* and return `true`, otherwise return `false`.

compiler/src/dotty/tools/dotc/core/StdNames.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ object StdNames {
386386
val Ref: N = "Ref"
387387
val RootPackage: N = "RootPackage"
388388
val RootClass: N = "RootClass"
389-
val Scala2Compat: N = "Scala2Compat"
390389
val Select: N = "Select"
391390
val Shape: N = "Shape"
392391
val StringContext: N = "StringContext"

library/src/scalaShadowing/language.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@ object language {
225225
object genericNumberLiterals
226226
}
227227

228-
/** Where imported, a backwards compatibility mode for Scala2 is enabled */
229-
object Scala2Compat
230-
231228
/** Where imported, auto-tupling is disabled */
232229
object noAutoTupling
233230

0 commit comments

Comments
 (0)