@@ -497,17 +497,6 @@ class Definitions {
497497 def staticsMethodRef (name : PreName ): TermRef = ScalaStaticsModule .requiredMethodRef(name)
498498 def staticsMethod (name : PreName ): TermSymbol = ScalaStaticsModule .requiredMethod(name)
499499
500- // Dotty deviation: we cannot use a @tu lazy val here because @tu lazy vals in dotty
501- // will return "null" when called recursively, see #1856.
502- def DottyPredefModule : Symbol = {
503- if (myDottyPredefModule == null ) {
504- myDottyPredefModule = getModuleIfDefined(" dotty.DottyPredef" )
505- assert(myDottyPredefModule != null )
506- }
507- myDottyPredefModule
508- }
509- private var myDottyPredefModule : Symbol = _
510-
511500 @ tu lazy val DottyArraysModule : Symbol = requiredModule(" scala.runtime.Arrays" )
512501 def newGenericArrayMethod (using Context ): TermSymbol = DottyArraysModule .requiredMethod(" newGenericArray" )
513502 def newArrayMethod (using Context ): TermSymbol = DottyArraysModule .requiredMethod(" newArray" )
@@ -1338,10 +1327,8 @@ class Definitions {
13381327 JavaImportFns :+
13391328 RootRef (() => ScalaPackageVal .termRef)
13401329
1341- private val PredefImportFns : List [RootRef ] = List (
1342- RootRef (() => ScalaPredefModule .termRef, isPredef= true ),
1343- RootRef (() => DottyPredefModule .termRef)
1344- )
1330+ private val PredefImportFns : RootRef =
1331+ RootRef (() => ScalaPredefModule .termRef, isPredef= true )
13451332
13461333 @ tu private lazy val JavaRootImportFns : List [RootRef ] =
13471334 if ctx.settings.YnoImports .value then Nil
@@ -1350,7 +1337,7 @@ class Definitions {
13501337 @ tu private lazy val ScalaRootImportFns : List [RootRef ] =
13511338 if ctx.settings.YnoImports .value then Nil
13521339 else if ctx.settings.YnoPredef .value then ScalaImportFns
1353- else ScalaImportFns + + PredefImportFns
1340+ else ScalaImportFns : + PredefImportFns
13541341
13551342 @ tu private lazy val JavaRootImportTypes : List [TermRef ] = JavaRootImportFns .map(_.refFn())
13561343 @ tu private lazy val ScalaRootImportTypes : List [TermRef ] = ScalaRootImportFns .map(_.refFn())
@@ -1382,7 +1369,7 @@ class Definitions {
13821369 else ScalaUnqualifiedOwnerTypes
13831370
13841371 /** Names of the root import symbols that can be hidden by other imports */
1385- @ tu lazy val ShadowableImportNames : Set [TermName ] = Set (" Predef" , " DottyPredef " ).map(_ .toTermName)
1372+ @ tu lazy val ShadowableImportNames : Set [TermName ] = Set (" Predef" .toTermName)
13861373
13871374 /** Class symbols for which no class exist at runtime */
13881375 @ tu lazy val NotRuntimeClasses : Set [Symbol ] = Set (AnyClass , AnyValClass , NullClass , NothingClass )
0 commit comments