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

Type narrowing with filter #497

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Type narrowing with filter #497

merged 2 commits into from
Mar 21, 2024

Conversation

mtshiba
Copy link
Member

@mtshiba mtshiba commented Mar 21, 2024

Now, this code passes type checking.

xs: [Nat or NoneType; _] = [1, None, 2]
ys: [Nat; _] = array filter x -> x != None, xs

@mtshiba mtshiba merged commit 11f3d8f into main Mar 21, 2024
20 checks passed
@mtshiba mtshiba deleted the filter-guard branch March 21, 2024 09:41
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.

1 participant