@@ -497,17 +497,6 @@ class Definitions {
497
497
def staticsMethodRef (name : PreName ): TermRef = ScalaStaticsModule .requiredMethodRef(name)
498
498
def staticsMethod (name : PreName ): TermSymbol = ScalaStaticsModule .requiredMethod(name)
499
499
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
-
511
500
@ tu lazy val DottyArraysModule : Symbol = requiredModule(" scala.runtime.Arrays" )
512
501
def newGenericArrayMethod (using Context ): TermSymbol = DottyArraysModule .requiredMethod(" newGenericArray" )
513
502
def newArrayMethod (using Context ): TermSymbol = DottyArraysModule .requiredMethod(" newArray" )
@@ -1338,10 +1327,8 @@ class Definitions {
1338
1327
JavaImportFns :+
1339
1328
RootRef (() => ScalaPackageVal .termRef)
1340
1329
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 )
1345
1332
1346
1333
@ tu private lazy val JavaRootImportFns : List [RootRef ] =
1347
1334
if ctx.settings.YnoImports .value then Nil
@@ -1350,7 +1337,7 @@ class Definitions {
1350
1337
@ tu private lazy val ScalaRootImportFns : List [RootRef ] =
1351
1338
if ctx.settings.YnoImports .value then Nil
1352
1339
else if ctx.settings.YnoPredef .value then ScalaImportFns
1353
- else ScalaImportFns + + PredefImportFns
1340
+ else ScalaImportFns : + PredefImportFns
1354
1341
1355
1342
@ tu private lazy val JavaRootImportTypes : List [TermRef ] = JavaRootImportFns .map(_.refFn())
1356
1343
@ tu private lazy val ScalaRootImportTypes : List [TermRef ] = ScalaRootImportFns .map(_.refFn())
@@ -1382,7 +1369,7 @@ class Definitions {
1382
1369
else ScalaUnqualifiedOwnerTypes
1383
1370
1384
1371
/** 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)
1386
1373
1387
1374
/** Class symbols for which no class exist at runtime */
1388
1375
@ tu lazy val NotRuntimeClasses : Set [Symbol ] = Set (AnyClass , AnyValClass , NullClass , NothingClass )
0 commit comments