@@ -1537,9 +1537,7 @@ class Definitions {
15371537      denot.sourceModule.info =  denot.typeRef //  we run into a cyclic reference when patching if this line is omitted
15381538      patch2(denot, patchCls)
15391539
1540-     if  ctx.settings.YcompileScala2Library .value then 
1541-       ()
1542-     else  if  denot.name ==  tpnme.Predef .moduleClassName &&  denot.symbol ==  ScalaPredefModuleClass  then 
1540+     if  denot.name ==  tpnme.Predef .moduleClassName &&  denot.symbol ==  ScalaPredefModuleClass  then 
15431541      patchWith(ScalaPredefModuleClassPatch )
15441542    else  if  denot.name ==  tpnme.language.moduleClassName &&  denot.symbol ==  LanguageModuleClass  then 
15451543      patchWith(LanguageModuleClassPatch )
@@ -1880,7 +1878,7 @@ class Definitions {
18801878    ||  tp.derivesFrom(defn.PolyFunctionClass )   //  TODO check for refinement?
18811879
18821880  private  def  withSpecMethods (cls : ClassSymbol , bases : List [Name ], paramTypes : Set [TypeRef ]) = 
1883-     if  ! ctx.settings. YcompileScala2Library .value  then 
1881+     if  ! Feature .shouldBehaveAsScala2  then 
18841882      for  base <-  bases; tp <-  paramTypes do 
18851883        cls.enter(newSymbol(cls, base.specializedName(List (tp)), Method , ExprType (tp)))
18861884    cls
@@ -1923,7 +1921,7 @@ class Definitions {
19231921      case  List (x, y) =>  Tuple2SpecializedParamClasses ().contains(x.classSymbol) &&  Tuple2SpecializedParamClasses ().contains(y.classSymbol)
19241922      case  _          =>  false 
19251923    &&  base.owner.denot.info.member(base.name.specializedName(args)).exists //  when dotc compiles the stdlib there are no specialised classes
1926-     &&  ! ctx.settings. YcompileScala2Library .value  //  We do not add the specilized TupleN methods/classes when compiling the stdlib
1924+     &&  ! Feature .shouldBehaveAsScala2  //  We do not add the specilized TupleN methods/classes when compiling the stdlib
19271925
19281926  def  isSpecializableFunction (cls : ClassSymbol , paramTypes : List [Type ], retType : Type )(using  Context ):  Boolean  = 
19291927    paramTypes.length <=  2 
@@ -1945,7 +1943,7 @@ class Definitions {
19451943      case  _ => 
19461944        false 
19471945    })
1948-     &&  ! ctx.settings. YcompileScala2Library .value  //  We do not add the specilized FunctionN methods/classes when compiling the stdlib
1946+     &&  ! Feature .shouldBehaveAsScala2  //  We do not add the specilized FunctionN methods/classes when compiling the stdlib
19491947
19501948  @ tu lazy  val  Function0SpecializedApplyNames :  List [TermName ] = 
19511949    for  r <-  Function0SpecializedReturnTypes 
0 commit comments