Skip to content

Commit c1e5ddd

Browse files
committed
wip
1 parent 67355f5 commit c1e5ddd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,13 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(implicit ctx: Context) {
466466
trace(i"inlining $call", inlining, show = true) {
467467

468468
// The normalized bindings collected in `bindingsBuf`
469-
bindingsBuf.transform(reducer.normalizeBinding(_)(inlineCtx))
469+
bindingsBuf.transform { binding =>
470+
val transformedBinding = reducer.normalizeBinding(binding)(inlineCtx)
471+
// Set trees to symbols allow macros to see the definition tree.
472+
// This is used by `underlyingArgument`.
473+
transformedBinding.symbol.defTree = transformedBinding
474+
transformedBinding
475+
}
470476

471477
// Evaluate the top level ~ if it is a macro
472478
val expansion0 =

0 commit comments

Comments
 (0)