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

Use T.untyped safe nilability #1035

Merged
merged 1 commit into from
Jul 6, 2022
Merged

Use T.untyped safe nilability #1035

merged 1 commit into from
Jul 6, 2022

Conversation

paracycle
Copy link
Member

Motivation

We should not blindly use "T.nilable(#{type})" interpolation to generate nilable types since T.nilable(T.untyped) is illegal now. We should instead use the as_nilable_type helper to generate nilable types.

Also simplifying the logic to check for a nilable type here as well.

Tests

Existing tests are unchanged

We should not blindly use `"T.nilable(#{type})"` interpolation to generate
nilable types since `T.nilable(T.untyped)` is illegal now. We should
instead use the `as_nilable_type` helper to generate nilable types.

Also simplifying the logic to check for a nilable type here as well.
@paracycle paracycle requested a review from a team July 5, 2022 22:21
@paracycle paracycle merged commit 72e87b9 into main Jul 6, 2022
@paracycle paracycle deleted the uk-fix-nilable-usage branch July 6, 2022 14:39
@shopify-shipit shopify-shipit bot temporarily deployed to production July 7, 2022 17:53 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to 0-9-stable August 19, 2022 20:37 Inactive
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.

None yet

4 participants