Skip to content
Merged
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 @@ -141,7 +141,10 @@ class CheckUnused private (phaseMode: PhaseMode, suffix: String) extends MiniPha
tree

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 @@ -425,6 +428,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