From 1b77bab7049d1284667a4ddaa76c86bc5c524f79 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Tue, 8 Oct 2024 19:48:05 -0700 Subject: [PATCH] Handle quotes and splices --- .../dotty/tools/dotc/transform/CheckUnused.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index 160198dd37c5..b8ac7894e5b1 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -228,6 +228,19 @@ class CheckUnused private (phaseMode: CheckUnused.PhaseMode, suffix: String, _ke case Annotated(arg, annot) => transformAllDeep(arg) transformAllDeep(annot) + case Quote(body, tags) => + transformAllDeep(body) + tags.foreach(transformAllDeep) + case Splice(expr) => + transformAllDeep(expr) + case QuotePattern(bindings, body, quotes) => + bindings.foreach(transformAllDeep) + transformAllDeep(body) + transformAllDeep(quotes) + case SplicePattern(body, typeargs, args) => + transformAllDeep(body) + typeargs.foreach(transformAllDeep) + args.foreach(transformAllDeep) case _: InferredTypeTree => case _ if tree.isType => //println(s"OTHER TYPE ${tree.getClass} ${tree.show}")