File tree 3 files changed +7
-12
lines changed
compiler/src/dotty/tools/dotc
3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -1369,7 +1369,9 @@ class Definitions {
1369
1369
denot.sourceModule.info = denot.typeRef // we run into a cyclic reference when patching if this line is omitted
1370
1370
patch2(denot, patchCls)
1371
1371
1372
- if denot.name == tpnme.Predef .moduleClassName && denot.symbol == ScalaPredefModuleClass then
1372
+ if ctx.settings.Yscala2Stdlib .value then
1373
+ ()
1374
+ else if denot.name == tpnme.Predef .moduleClassName && denot.symbol == ScalaPredefModuleClass then
1373
1375
patchWith(ScalaPredefModuleClassPatch )
1374
1376
else if denot.name == tpnme.language.moduleClassName && denot.symbol == LanguageModuleClass then
1375
1377
patchWith(LanguageModuleClassPatch )
Original file line number Diff line number Diff line change @@ -574,16 +574,11 @@ object TreeChecker {
574
574
575
575
val symbolsNotDefined = (decls -- defined - constr.symbol).filterNot(isAllowed)
576
576
577
- def isScala2LibBootstrappedIssue =
578
- // TODO remove the need for this workaround
579
- // Patched members should be added to they class to they definitions
580
- ctx.settings.Yscala2Stdlib .value && (
581
- cls == defn.ScalaPredefModuleClass // scala.runtime.stdLibPatches.Predef
582
- || defn.isTupleClass(cls) // specialized members
583
- || cls.ownersIterator.contains(defn.LanguageModuleClass ) // duplications?
584
- )
577
+ def isStdlibBootstrappedIssue =
578
+ // FIXME: specialized members of TupleN are failing. These should not exist.
579
+ ctx.settings.Yscala2Stdlib .value && defn.isTupleClass(cls)
585
580
586
- assert(symbolsNotDefined.isEmpty || isScala2LibBootstrappedIssue ,
581
+ assert(symbolsNotDefined.isEmpty || isStdlibBootstrappedIssue ,
587
582
i " $cls tree does not define members: ${symbolsNotDefined.toList}%, % \n " +
588
583
i " expected: ${decls.toList}%, % \n " +
589
584
i " defined: ${defined}%, % " )
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ class YCheckPositions extends Phase {
25
25
val checker = new TreeTraverser {
26
26
private var sources : List [SourceFile ] = ctx.source :: Nil
27
27
def traverse (tree : tpd.Tree )(using Context ): Unit = {
28
- if ctx.settings.Yscala2Stdlib .value && tree.source.toString == " library/src/scala/runtime/stdLibPatches/Predef.scala" then
29
- return // FIXME: there is a conflict between the sources of scala.Predef and scala.runtime.stdLibPatches.Predef
30
28
31
29
// Check current context is correct
32
30
assert(ctx.source == sources.head)
You can’t perform that action at this time.
0 commit comments