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

[BUG] Assert<> with a object member which can a be Type or null does not generate the correct code (fails if null) #30

Closed
FredTreg opened this issue Jul 30, 2023 · 0 comments

Comments

@FredTreg
Copy link
Contributor

FredTreg commented Jul 30, 2023

Describe the bug
Check failing playground and hit run. Any type having a member such as:

MyType : {
  member: MySubType | null
}

will incorrectly fail assertion if MySubType is an object type and member value is null

Please also check the working playground: when using string instead of MySubType, assert code is correctly generated.

Playground link
failing playground
working playground

Expected behavior
Assertion code is correct

Additional context
0.3.2

@FredTreg FredTreg changed the title [BUG] Assert<> with a member which can a Type or null does not generate the correct code (fails if null) [BUG] Assert<> with a object member which can a be Type or null does not generate the correct code (fails if null) Jul 30, 2023
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

No branches or pull requests

1 participant