Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the correct owner when quote making inlinable #13547

Merged
merged 3 commits into from Oct 11, 2021

Conversation

nicolasstucki
Copy link
Contributor

Fixes #13546

@nicolasstucki nicolasstucki marked this pull request as ready for review October 9, 2021 05:57
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

PrepareInlineable.makeInlineable(tree)
def quoteOwner(sym: Symbol): Symbol =
if sym.owner.isClass then sym else quoteOwner(sym.owner)
inContext(ctx.withOwner(quoteOwner(ctx.owner))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need quoteOwner.

ctx.owner.enclosingClass

will work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That will not work. We need the symbol of the method in that class. We are skipping local owners. Do we have something for that? I could not find it. I could add it to SymDenotation.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Ah, yes, I misunderstood. LGTM.

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.

Inline illegal access
3 participants