Skip to content

Commit 2a39cc2

Browse files
committed
State problematic paths explicitly
1 parent c98fc67 commit 2a39cc2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/dotty/tools/dotc/transform/YCheckPositions.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ class YCheckPositions extends Phase {
2525
val checker = new TreeTraverser {
2626
private var sources: List[SourceFile] = ctx.source :: Nil
2727
def traverse(tree: tpd.Tree)(using Context): Unit = {
28-
if tree.source.toString != "library/src/scala/runtime/stdLibPatches/Predef.scala" then // FIXME: remove this workaround
29-
28+
// FIXME: remove this workaround
29+
if !(tree.source.toString == "library/src/scala/runtime/stdLibPatches/Predef.scala"
30+
&& sources.head.toString.endsWith("src_managed/main/scala-library-src/scala/Predef.scala")) // TODO should this be library/src/scala/runtime/stdLibPatches/Predef.scala or library/src/scala/Predef.scala?
31+
then
3032
// Check current context is correct
3133
assert(ctx.source == sources.head)
3234
if (!tree.isEmpty && !tree.isInstanceOf[untpd.TypedSplice] && !tree.isInstanceOf[Inlined] && ctx.typerState.isGlobalCommittable)

0 commit comments

Comments
 (0)