Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion compiler/src/dotty/tools/dotc/transform/CheckUnused.scala
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ class CheckUnused private (phaseMode: PhaseMode, suffix: String) extends MiniPha
tree.expansion.putAttachment(InlinedParameter, ())
ctx
override def transformInlined(tree: Inlined)(using Context): tree.type =
transformAllDeep(tree.call)
if !tree.call.isEmpty then
if !refInfos.calls.containsKey(tree.call) then
refInfos.calls.put(tree.call, ())
transformAllDeep(tree.call)
tree

override def prepareForBind(tree: Bind)(using Context): Context =
Expand Down Expand Up @@ -491,6 +494,7 @@ object CheckUnused:
val asss = mutable.Set.empty[Symbol] // targets of assignment
val skip = mutable.Set.empty[Symbol] // methods to skip (don't warn about their params)
val nowarn = mutable.Set.empty[Symbol] // marked @nowarn
val calls = new IdentityHashMap[Tree, Unit] // inlined call already seen
val imps = new IdentityHashMap[Import, Unit] // imports
val sels = new IdentityHashMap[ImportSelector, Unit] // matched selectors
def register(tree: Tree)(using Context): Unit = if tree.srcPos.isUserCode then
Expand Down
5 changes: 1 addition & 4 deletions compiler/src/dotty/tools/dotc/transform/PostTyper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
case UnApply(fun, implicits, patterns) =>
// Reverse transform order for the same reason as in `app1` above.
val patterns1 = transform(patterns)
val tree1 = cpy.UnApply(tree)(transform(fun), transform(implicits), patterns1)
// The pickling of UnApply trees uses the tpe of the tree,
// so we need to clean retains from it here
tree1.withType(transformAnnotsIn(CleanupRetains()(tree1.tpe)))
cpy.UnApply(tree)(transform(fun), transform(implicits), patterns1)
case tree: TypeApply =>
if tree.symbol == defn.QuotedTypeModule_of then
ctx.compilationUnit.needsStaging = true
Expand Down
14 changes: 0 additions & 14 deletions tests/pos-custom-args/captures/i24207.scala

This file was deleted.

6 changes: 0 additions & 6 deletions tests/warn/i24263.scala

This file was deleted.