Commit 5a14e3e
liftdestructors: generate proper
## Summary
Fix an internal issue with type-bound operator lifting for closure
types.
## Details
Instead of a proper `isNil` check, generation of the "not nil" check
for
closure environments used the pointer expression itself as the
condition expression of an `if`.
Since the expression was translated as is and a pointer value is valid
in an `if` condition position in C, this worked, but it's not correct
according to NimSkull's type system. A proper "not nil" check is
generated now.
Co-authored-by: Saem Ghani <saemghani+github@gmail.com>isNil check (nim-works#1630)1 parent 07959b7 commit 5a14e3e
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
660 | 664 | | |
661 | | - | |
| 665 | + | |
662 | 666 | | |
663 | 667 | | |
664 | 668 | | |
665 | | - | |
666 | | - | |
| 669 | + | |
667 | 670 | | |
668 | 671 | | |
669 | 672 | | |
| |||
0 commit comments