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

We don't catch when null is assigned to a non-nulllable (inferred) variable #1738

Open
erikcorry opened this issue Aug 9, 2023 · 0 comments
Assignees

Comments

@erikcorry
Copy link

main:
  foo := non_nullable
  while foo:
    foo = nullable

non_nullable -> int:
  return 1

nullable -> int?:
  return null

This runs, and doesn't catch the place where we assign null to foo. It does warn though, because foo is non-nullable so the while is always true.

@kasperl kasperl changed the title We dont' catch when null is assigned to a non-nulllable (inferred) variable We don't catch when null is assigned to a non-nulllable (inferred) variable Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants