Always transform Inlined.call in CheckUnused
Fixes #23201
Previously, CheckUnused transformed the call tree of an Inlined node only after typer (and not after inlining), but inlining also results in non-trivial call trees.
Needs a minimized test, where an import is required for expansion but is unused at typer.
Still needs a test.
Still needs a test.
Do you need help minimizing it ? I can try to take a look
I'll take another swing at the test. Some combination of derives, inline given, and a macro.
I confirmed the second example on the ticket is similar; their workaround was to make the given not inline.
Superseded by https://github.com/scala/scala3/pull/24043