File tree Expand file tree Collapse file tree 3 files changed +3
-13
lines changed
compiler/src/dotty/tools/dotc/core
library/src/scalaShadowing Expand file tree Collapse file tree 3 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,6 @@ object StdNames {
358358 val Ref : N = " Ref"
359359 val RootPackage : N = " RootPackage"
360360 val RootClass : N = " RootClass"
361- val Scala2 : N = " Scala2"
362361 val Scala2Compat : N = " Scala2Compat"
363362 val Select : N = " Select"
364363 val Shape : N = " Shape"
Original file line number Diff line number Diff line change @@ -501,12 +501,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
501501 ! featureEnabled(nme.noAutoTupling)
502502
503503 def scala2CompatMode : Boolean =
504- featureEnabled(nme.Scala2Compat ) || {
505- val scala2 = featureEnabled(nme.Scala2 )
506- if scala2 then ctx.warning(" Use `-language:Scala2Compat` or `import scala.Scala2Compat` instead of `-language:Scala2` or `import scala.Scala2`" )
507- scala2
508- }
509-
504+ featureEnabled(nme.Scala2Compat )
510505
511506 def dynamicsEnabled : Boolean =
512507 featureEnabled(nme.dynamics)
@@ -523,11 +518,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
523518 * This test is used when we are too early in the pipeline to consider imports.
524519 */
525520 def scala2CompatSetting : Boolean =
526- ctx.settings.language.value.contains(nme.Scala2Compat .toString) || {
527- val scala2 = ctx.settings.language.value.contains(nme.Scala2 .toString)
528- if scala2 then ctx.warning(" Use -language:Scala2Compat instead of -language:Scala2" )
529- scala2
530- }
521+ ctx.settings.language.value.contains(nme.Scala2Compat .toString)
531522
532523 /** Refine child based on parent
533524 *
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- object Scala2
216+ object Scala2Compat
217217
218218 /** Where imported, auto-tupling is disabled */
219219 object noAutoTupling
You can’t perform that action at this time.
0 commit comments