Skip to content

Commit 17cf73d

Browse files
committed
Revert " fix scala#11401 (proxy parameter should be owned by proxy) (since boundSym is new, no need to use check in QuoteUtils.changeOwner)"
This reverts commit 0241150 This might help fix scala#12508
1 parent fd97aee commit 17cf73d

File tree

3 files changed

+2
-110
lines changed

3 files changed

+2
-110
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,11 +499,8 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
499499
bindingFlags |= Method
500500
val boundSym = newSym(InlineBinderName.fresh(name.asTermName), bindingFlags, bindingType).asTerm
501501
val binding = {
502-
var newArg = arg.changeOwner(ctx.owner, boundSym)
503-
if bindingFlags.is(Inline) && argIsBottom then
504-
newArg = Typed(newArg, TypeTree(formal)) // type ascribe RHS to avoid type errors in expansion. See i8612.scala
505-
if isByName then DefDef(boundSym, newArg)
506-
else ValDef(boundSym, newArg)
502+
if (isByName) DefDef(boundSym, arg.changeOwner(ctx.owner, boundSym))
503+
else ValDef(boundSym, arg)
507504
}.withSpan(boundSym.span)
508505
inlining.println(i"parameter binding: $binding, $argIsBottom")
509506
buf += binding

tests/pos-macros/i11401/Main_2.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/pos-macros/i11401/X_1.scala

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)