Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[mypyc] Simplify union types#14363

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 2 commits intomasterfrommypyc-simplify-union
Dec 28, 2022
Merged

[mypyc] Simplify union types#14363

JukkaL merged 2 commits intomasterfrommypyc-simplify-union
Dec 28, 2022

Conversation

@JukkaL
Copy link
Collaborator

@JukkaLJukkaL commentedDec 28, 2022
edited
Loading

We can sometimes simplify a mypyc RType union, even if the mypy union couldn't be simplified. A typical example islist[x] | list[y] which can be simplified to justlist. Previously this would generate a redundant unionunion[list, list].

We can sometimes simplify an RType union, even if the mypy unioncouldn't be simplified. A typical example is `list[x] | list[y]`which can be simplified to just `list`. Previously this wouldgenerate a redundant union `union[list, list]`.
@JukkaLJukkaL merged commit86dad8a intomasterDec 28, 2022
@JukkaLJukkaL deleted the mypyc-simplify-union branchDecember 28, 2022 15:41
JukkaL added a commit that referenced this pull requestDec 28, 2022
Fix crash related to unions in loops. The crash was introduced in#14363.Flatten nested unions before simplifying unions.
JukkaL added a commit that referenced this pull requestDec 29, 2022
Flatten nested unions before simplifying unions.Simplify item type unions in loops. This fixes a crash introduced in#14363.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@svalentinsvalentinsvalentin approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@JukkaL@svalentin

[8]ページ先頭

©2009-2025 Movatter.jp