Skip to content

Commit b47498d

Browse files
committed
Handle annon annotations that have splices
1 parent ecb8217 commit b47498d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,10 @@ class ReifyQuotes extends MacroTransform {
406406
cpy.DefDef(tree)(rhs = defaultValue(tree.rhs.tpe))
407407

408408
case tree: DefTree if level >= 1 =>
409-
val newAnnotations = tree.symbol.annotations.mapconserve {
410-
case ConcreteAnnotation(annotTree) =>
411-
val newAnnotTree = transform(annotTree) given ctx.withOwner(tree.symbol)
412-
ConcreteAnnotation(newAnnotTree)
413-
case annot => annot
409+
val newAnnotations = tree.symbol.annotations.mapconserve { annot =>
410+
val newAnnotTree = transform(annot.tree) given ctx.withOwner(tree.symbol)
411+
if (annot.tree == newAnnotTree) annot
412+
else ConcreteAnnotation(newAnnotTree)
414413
}
415414
tree.symbol.annotations = newAnnotations
416415
super.transform(tree)

compiler/test/dotc/pos-from-tasty.blacklist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ t3612.scala
66

77
# Other failure
88
t802.scala
9-
i7052.scala

0 commit comments

Comments
 (0)