From 597699243a6f935231ad83e63d22bf6ff9e4e547 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 1 Oct 2025 13:40:29 -0400 Subject: For structs and fixed-size ints, use `.has_value` instead of `.is_none` --- src/compile/functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compile/functions.c') diff --git a/src/compile/functions.c b/src/compile/functions.c index a1bc15ae..40e16e48 100644 --- a/src/compile/functions.c +++ b/src/compile/functions.c @@ -712,7 +712,7 @@ Text_t compile_function(env_t *env, Text_t name_code, ast_t *ast, Text_t *static assert(args); OptionalInt64_t cache_size = Int64$parse(Text$from_str(Match(cache, Int)->str), NULL); Text_t pop_code = EMPTY_TEXT; - if (cache->tag == Int && !cache_size.is_none && cache_size.value > 0) { + if (cache->tag == Int && cache_size.has_value && cache_size.value > 0) { // FIXME: this currently just deletes the first entry, but this // should be more like a least-recently-used cache eviction policy // or least-frequently-used -- cgit v1.2.3