aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-21 22:13:21 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-21 22:13:21 -0500
commitd6de03feb280d179efa07e1727f42955b25d733c (patch)
treedd2ce4b8fe7b46ade6de7e45840b8c6840c4fdf7 /src
parent76b434a6be6c05d7d3dae5b77ec8fd886fd715d0 (diff)
Fix optional path none checks
Diffstat (limited to 'src')
-rw-r--r--src/compile/optionals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile/optionals.c b/src/compile/optionals.c
index b4930d02..ffe16248 100644
--- a/src/compile/optionals.c
+++ b/src/compile/optionals.c
@@ -92,8 +92,8 @@ Text_t check_none(type_t *t, Text_t value) {
// NOTE: these use statement expressions ({...;}) because some compilers
// complain about excessive parens around equality comparisons
if (t->tag == PointerType || t->tag == FunctionType || t->tag == CStringType) return Texts("(", value, " == NULL)");
- else if (t == PATH_TYPE) return Texts("((", value, ").type.$tag == PATHTYPE_NONE)");
- else if (t == PATH_TYPE_TYPE) return Texts("((", value, ").$tag == PATHTYPE_NONE)");
+ else if (t == PATH_TYPE) return Texts("((", value, ").type == PATHTYPE_NONE)");
+ else if (t == PATH_TYPE_TYPE) return Texts("((", value, ") == PATHTYPE_NONE)");
else if (t->tag == BigIntType) return Texts("((", value, ").small == 0)");
else if (t->tag == ClosureType) return Texts("((", value, ").fn == NULL)");
else if (t->tag == NumType)