aboutsummaryrefslogtreecommitdiff
path: root/src/compile/optionals.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compile/optionals.c')
-rw-r--r--src/compile/optionals.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compile/optionals.c b/src/compile/optionals.c
index bd5f861d..c8a7276c 100644
--- a/src/compile/optionals.c
+++ b/src/compile/optionals.c
@@ -53,7 +53,7 @@ Text_t compile_none(type_t *t) {
if (t == NULL) compiler_err(NULL, NULL, NULL, "I can't compile a `none` value with no type");
if (t == PATH_TYPE) return Text("NONE_PATH");
- else if (t == PATH_TYPE_TYPE) return Text("((OptionalPathType_t){.type = PATH_NONE})");
+ else if (t == PATH_TYPE_TYPE) return Text("((OptionalPathType_t){.type = PATHTYPE_NONE})");
switch (t->tag) {
case BigIntType: return Text("NONE_INT");
@@ -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 == PATH_NONE)");
- else if (t == PATH_TYPE_TYPE) return Texts("((", value, ").$tag == PATH_NONE)");
+ 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->tag == BigIntType) return Texts("((", value, ").small == 0)");
else if (t->tag == ClosureType) return Texts("((", value, ").fn == NULL)");
else if (t->tag == NumType)