From d6de03feb280d179efa07e1727f42955b25d733c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 21 Nov 2025 22:13:21 -0500 Subject: Fix optional path none checks --- src/compile/optionals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3