Skip to content

Commit a52c208

Browse files
committed
Assert ctx.source is correct
1 parent 7363503 commit a52c208

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class Staging extends MacroTransform {
7070
new TreeTraverser {
7171
private[this] var sources: List[SourceFile] = ctx.source :: Nil
7272
def traverse(tree: tpd.Tree)(implicit ctx: Context): Unit = {
73+
assert(ctx.source == sources.head)
7374
if (!tree.isEmpty && !tree.isInstanceOf[untpd.TypedSplice] && ctx.typerState.isGlobalCommittable) {
7475
if (!tree.isType) { // TODO also check types, currently we do not add Inlined(EmptyTree, _, _) for types. We should.
7576
val currentSource = sources.head

0 commit comments

Comments
 (0)