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: infer optional type for null and non-optional conditional branches #429

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

anton-trunov
Copy link
Member

@anton-trunov anton-trunov commented Jun 17, 2024

Closes #428

  • I have updated CHANGELOG.md
  • I have added tests to demonstrate the contribution is correctly implemented: this usually includes both positive and negative tests, showing the happy path(s) and featuring intentionally broken cases
  • I have run all the tests locally and no test failure was reported
  • I have run the linter, formatter and spellchecker
  • I did not do unrelated and/or undiscussed refactorings

branches

e.g. for `null` and `Int` we can infer `Int?`
@anton-trunov anton-trunov added this to the v1.4.0 milestone Jun 17, 2024
@anton-trunov anton-trunov self-assigned this Jun 17, 2024
Copy link
Member

@Gusarich Gusarich left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

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

🆒

@anton-trunov anton-trunov merged commit 0ebc24f into main Jun 17, 2024
3 checks passed
@anton-trunov anton-trunov deleted the most-general-type-for-conditional branch June 17, 2024 20:18
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.

Typechecker should infer most general type for conditional expression's branches
3 participants