aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-30 20:47:38 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-30 20:47:38 -0400
commitc66946435bc76ed705278dd756eb1abfc41c2e34 (patch)
treef4a842a9c3f1eb5b55bd9c4fa7a61ac382c693bb /src
parentcd7db542748d4ae8262e2fcb4a71c94c87ebf0e7 (diff)
Update wording to remove 'null'
Diffstat (limited to 'src')
-rw-r--r--src/typecheck.c4
1 files changed, 2 insertions, 2 deletions
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;