Skip to content

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Nov 13, 2024

Closes #20471
I would just reopen #21932, but it looks like that's disallowed after force pushing... (apologies for the spam)

@jchyb jchyb marked this pull request as ready for review November 14, 2024 10:38
@jchyb jchyb requested a review from hamzaremmal November 14, 2024 10:39
Comment on lines +244 to +246
val treeCpy = TreeTypeMap(oldOwners = List(owner), newOwners = List(owner)).apply(tree)
// Then replace the symbol owner with the one pointed by the quote context.
treeCpy.changeNonLocalOwners(ctx.owner)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious why not propose this change, I've tried it locally with the test for #20471 but the following test (and only one) tests/run-staging/quote-ackermann-1.scala fails.

Suggested change
val treeCpy = TreeTypeMap(oldOwners = List(owner), newOwners = List(owner)).apply(tree)
// Then replace the symbol owner with the one pointed by the quote context.
treeCpy.changeNonLocalOwners(ctx.owner)
TreeTypeMap(oldOwners = List(owner), newOwners = List(ctx.owner)).apply(tree)
// Then replace the symbol owner with the one pointed by the quote context.
//treeCpy.changeNonLocalOwners(ctx.owner)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symbol.asQuotes doesn't work as advertised
3 participants