Closed Hazematman closed 1 year ago
Teal Playground URL: https://649--teal-playground-preview.netlify.app
Closing this PR as it only address one issue surrounding nil ability of types. Proper nil checking would require more changes to the type system.
This pull request add a new warning when you assign
nil
to a type that is not-nilable. For example the following codewill now return an warning that looks like
hinting that the correct way to write this code is (assuming that you want assigning nil to be valid)
This change causes the tl compiler to throw a lot of warning when building. If required I could modify the tl compiler to explicitly mark types as nilable where required.
This change also required a test update to the record function spec tests, as one of the tests would assign nil to a boolean value and then expect zero warning to be generated.