Skip to content

Commit f8fa97c

Browse files
committed
Assert ctx.source is correct
1 parent 4530376 commit f8fa97c

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
@@ -68,6 +68,7 @@ class Staging extends MacroTransform {
6868
new TreeTraverser {
6969
private[this] var sources: List[SourceFile] = ctx.source :: Nil
7070
def traverse(tree: tpd.Tree)(implicit ctx: Context): Unit = {
71+
assert(ctx.source == sources.head)
7172
if (!tree.isEmpty && !tree.isInstanceOf[untpd.TypedSplice] && ctx.typerState.isGlobalCommittable) {
7273
if (!tree.isType) { // TODO also check types, currently we do not add Inlined(EmptyTree, _, _) for types. We should.
7374
val currentSource = sources.head

0 commit comments

Comments
 (0)