Skip to content

Commit 1fb83bd

Browse files
authored
Merge pull request #15631 from dotty-staging/fix-15629
2 parents 79d9a6f + b875cc0 commit 1fb83bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class Namer { typer: Typer =>
478478
if (child == other)
479479
annots // can happen if a class has several inaccessible children
480480
else {
481-
assert(childStart != other.span.start, i"duplicate child annotation $child / $other")
481+
assert(childStart != other.span.start || child.source != other.source, i"duplicate child annotation $child / $other")
482482
val (prefix, otherAnnot :: rest) = annots.span(_.symbol != defn.ChildAnnot): @unchecked
483483
prefix ::: otherAnnot :: insertInto(rest)
484484
}

0 commit comments

Comments
 (0)