Skip to content

Fail not inlined inline method calls early #22925

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Apr 7, 2025

All of them would be achieved with implicit resolution, during which the global state (ctx.base) would have stopInlining set to true, but the corresponding error might not have been shown as part of that implicit resolution - now we reset that value after failing the implicit, if it was not already set before typing the implicit.

In a previous PR #13783, an issue #13044 where a similar situation occurred was fixed by adding a check for a not inlined inline method call in erasure, and reporting the error there. For #i22423, this check was not early enough, leading to a crash in the same phase for symbols using specialErasure. Adding an additional check there would not be enough, as this particular minimisation also fails post-inlining Ychecks. Even outside of that, I also believe it's better to fail this early anyway, and also allow implicit resolution to try to pick another option if we each the mainline limit in another option.

Fixes #22423

All of them would be achieved with implicit resolution, during which
the global state (ctx.base) would have stopInlining set to true, but
the corresponding error might not have been shown as part of
the implicit resolution - now we reset that value after failing the
implicit, if it was not set before typing the implicit.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assert error on inline fail: "assertion failed: method *: in trait Tuple"
1 participant