@@ -1538,9 +1538,7 @@ class Definitions {
15381538 denot.sourceModule.info = denot.typeRef // we run into a cyclic reference when patching if this line is omitted
15391539 patch2(denot, patchCls)
15401540
1541- if ctx.settings.YcompileScala2Library .value then
1542- ()
1543- else if denot.name == tpnme.Predef .moduleClassName && denot.symbol == ScalaPredefModuleClass then
1541+ if denot.name == tpnme.Predef .moduleClassName && denot.symbol == ScalaPredefModuleClass then
15441542 patchWith(ScalaPredefModuleClassPatch )
15451543 else if denot.name == tpnme.language.moduleClassName && denot.symbol == LanguageModuleClass then
15461544 patchWith(LanguageModuleClassPatch )
@@ -1883,7 +1881,7 @@ class Definitions {
18831881 || tp.derivesFrom(defn.PolyFunctionClass ) // TODO check for refinement?
18841882
18851883 private def withSpecMethods (cls : ClassSymbol , bases : List [Name ], paramTypes : Set [TypeRef ]) =
1886- if ! ctx.settings. YcompileScala2Library .value then
1884+ if ! Feature .shouldBehaveAsScala2 then
18871885 for base <- bases; tp <- paramTypes do
18881886 cls.enter(newSymbol(cls, base.specializedName(List (tp)), Method , ExprType (tp)))
18891887 cls
@@ -1926,7 +1924,7 @@ class Definitions {
19261924 case List (x, y) => Tuple2SpecializedParamClasses ().contains(x.classSymbol) && Tuple2SpecializedParamClasses ().contains(y.classSymbol)
19271925 case _ => false
19281926 && base.owner.denot.info.member(base.name.specializedName(args)).exists // when dotc compiles the stdlib there are no specialised classes
1929- && ! ctx.settings. YcompileScala2Library .value // We do not add the specilized TupleN methods/classes when compiling the stdlib
1927+ && ! Feature .shouldBehaveAsScala2 // We do not add the specilized TupleN methods/classes when compiling the stdlib
19301928
19311929 def isSpecializableFunction (cls : ClassSymbol , paramTypes : List [Type ], retType : Type )(using Context ): Boolean =
19321930 paramTypes.length <= 2
@@ -1948,7 +1946,7 @@ class Definitions {
19481946 case _ =>
19491947 false
19501948 })
1951- && ! ctx.settings. YcompileScala2Library .value // We do not add the specilized FunctionN methods/classes when compiling the stdlib
1949+ && ! Feature .shouldBehaveAsScala2 // We do not add the specilized FunctionN methods/classes when compiling the stdlib
19521950
19531951 @ tu lazy val Function0SpecializedApplyNames : List [TermName ] =
19541952 for r <- Function0SpecializedReturnTypes
0 commit comments