Skip to content

Commit

Permalink
Handle quotes and splices
Browse files Browse the repository at this point in the history
  • Loading branch information
som-snytt committed Oct 9, 2024
1 parent aabfe0f commit 1b77bab
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 1b77bab

Please sign in to comment.