From c66946435bc76ed705278dd756eb1abfc41c2e34 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 30 Apr 2025 20:47:38 -0400 Subject: Update wording to remove 'null' --- src/typecheck.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/typecheck.c') diff --git a/src/typecheck.c b/src/typecheck.c index 0247c926..04c6897f 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -658,7 +658,7 @@ type_t *get_type(env_t *env, ast_t *ast) type_t *ref_type = get_type(env, value); type_t *base_type = get_type(env, base); if (base_type->tag == OptionalType) { - code_err(base, "This value might be null, so it can't be safely dereferenced"); + code_err(base, "This value might be none, so it can't be safely dereferenced"); } else if (base_type->tag == PointerType) { DeclareMatch(ptr, base_type, PointerType); return Type(PointerType, .pointed=ref_type, .is_stack=ptr->is_stack); @@ -835,7 +835,7 @@ type_t *get_type(env_t *env, ast_t *ast) DeclareMatch(indexing, ast, Index); type_t *indexed_t = get_type(env, indexing->indexed); if (indexed_t->tag == OptionalType && !indexing->index) - code_err(ast, "You're attempting to dereference a value whose type indicates it could be null"); + code_err(ast, "You're attempting to dereference a value whose type indicates it could be none"); if (indexed_t->tag == PointerType && !indexing->index) return Match(indexed_t, PointerType)->pointed; -- cgit v1.2.3