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

Backport "Map over refs of ImportTypes in TypeMap" to LTS #21165

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

WojciechMazur
Copy link
Contributor

Backports #20837 to the LTS branch.

PR submitted by the release tooling.
[skip ci]

The inliner replaces references to parameters by
their corresponding proxys, including in singleton types.
It did not, however, handle the mapping over import types,
the symbols of which way have depended on parameters.

Mapping imports correctly was necessary for i19493
since the `summonInline` resolves post inlining to
a given imported within the inline definition.

Fix #19493

[Cherry-picked 413d7b4]
Both i19493 and i19436 require mapping the type of
the expr in an `ImportType` which is itself the info of a `TermRef`.
In the first issue, for the substitution of an inline def parameter proxy.
In the second issue, for the parameter of a lambda returned from an inline def.

Both can be handled in `TypeMap` by mapping over references to `ImportType`s.
The second case also requires modifying `TreeTypeMap#mapType` such that
the logic mapping over imports is done within a `TypeMap` doing the symbol substitutions.

Fixes #19436

[Cherry-picked ff003fd]
Base automatically changed from lts-20592 to lts-3.3 July 11, 2024 08:04
@WojciechMazur
Copy link
Contributor Author

No regressions detected in the community build up to lts-21070.

Reference

@WojciechMazur WojciechMazur merged commit 1252a0f into lts-3.3 Jul 11, 2024
19 checks passed
@WojciechMazur WojciechMazur deleted the lts-20837 branch July 11, 2024 08:05
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.

2 participants