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

fix: handle custom local names for widened types #2401

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Aug 16, 2024

fixes #2397

pass.Pkg.Imports() did not always* include the local name alias from the import statement, so instead we need to do our checks via PkgName which does include it.

*it includes it in the example in our tests, but didn't in the case that our partner project was hitting...
I've added another test case that previously failed like theirs did.

@matt2e matt2e added the run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue label Aug 16, 2024
@ftl-robot ftl-robot mentioned this pull request Aug 16, 2024
@matt2e matt2e marked this pull request as ready for review August 18, 2024 23:40
@matt2e matt2e requested review from a team and safeer and removed request for a team August 18, 2024 23:40
Copy link
Collaborator

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

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

Ship it!

@alecthomas alecthomas added this pull request to the merge queue Aug 19, 2024
Merged via the queue into main with commit 13355eb Aug 19, 2024
73 checks passed
@alecthomas alecthomas deleted the matt2e/widened-with-import branch August 19, 2024 09:00
safeer pushed a commit that referenced this pull request Aug 19, 2024
fixes #2397

`pass.Pkg.Imports()` did not always* include the local name alias from
the import statement, so instead we need to do our checks via `PkgName`
which does include it.

*it includes it in the example in our tests, but didn't in the case that
our partner project was hitting...
I've added another test case that previously failed like theirs did.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-all A PR with this label will run the full set of CI jobs in the PR rather than in the merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typealiasing an external type breaks for imports with a local name
3 participants