diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2026-01-11 15:41:24 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2026-01-11 15:41:24 -0500 |
| commit | 1ac5ad89c234e4ce18c7b2348c35354c2f6e8f9a (patch) | |
| tree | cb09b88282c9ff71262e90162c706b34f471dcd7 | |
| parent | a923bc81396a83c36d84df153572ad28c7d38616 (diff) | |
Fix for optional check
| -rw-r--r-- | src/compile/optionals.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compile/optionals.c b/src/compile/optionals.c index bf8bf4aa..00af0856 100644 --- a/src/compile/optionals.c +++ b/src/compile/optionals.c @@ -92,7 +92,7 @@ Text_t check_none(type_t *t, Text_t value) { else if (t->tag == ClosureType) return Texts("((", value, ").fn == NULL)"); else if (t->tag == FloatType) return Texts(Match(t, FloatType)->bits == TYPE_NBITS64 ? "Float64$isnan(" : "Float32$isnan(", value, ")"); - else if (t->tag == RealType) return Texts("Real$is_none(", value, ")"); + else if (t->tag == RealType) return Texts("Real$is_none(stack(", value, "), &Real$info)"); else if (t->tag == ListType) return Texts("((", value, ").data == NULL)"); else if (t->tag == TableType) return Texts("((", value, ").entries.data == NULL)"); else if (t->tag == BoolType) return Texts("((", value, ") == NONE_BOOL)"); |
