From 1f9147187d66e95a0ffedd4d5595ec98646b5fe1 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 25 Mar 2025 15:40:59 -0400 Subject: Make docstring tests use an actual expression AST instead of text matching --- src/types.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/types.c') diff --git a/src/types.c b/src/types.c index 506850e8..7e5f262d 100644 --- a/src/types.c +++ b/src/types.c @@ -285,6 +285,7 @@ PUREFUNC bool has_heap_memory(type_t *t) PUREFUNC bool has_stack_memory(type_t *t) { + if (!t) return false; switch (t->tag) { case PointerType: return Match(t, PointerType)->is_stack; case OptionalType: return has_stack_memory(Match(t, OptionalType)->type); -- cgit v1.2.3