aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-18 15:22:51 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-18 15:22:51 -0400
commita49870f810f19bef7e1dae1f61681c1682823d00 (patch)
treed00588be4f289c3036cdf2e7ad252f06663cd154 /compile.c
parentf4b04a1b8cd882e25fee592c819650c9b7e8566b (diff)
Add primality testing and next_prime()/prev_prime()
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index c0f52c4f..dffa145e 100644
--- a/compile.c
+++ b/compile.c
@@ -200,7 +200,7 @@ static CORD compile_lvalue(env_t *env, ast_t *ast)
ast_t *subject = ast->tag == Index ? Match(ast, Index)->indexed : Match(ast, FieldAccess)->fielded;
code_err(subject, "This is an immutable value, you can't assign to it");
} else {
- code_err(ast, "This is a value of type %T and can't be assigned to", get_type(env, ast));
+ code_err(ast, "This is a value of type %T and can't be used as an assignment target", get_type(env, ast));
}
}
@@ -209,7 +209,7 @@ static CORD compile_lvalue(env_t *env, ast_t *ast)
type_t *container_t = get_type(env, index->indexed);
if (!index->index && container_t->tag == PointerType) {
if (Match(container_t, PointerType)->is_optional)
- code_err(index->indexed, "This pointer might be null, so it can't be safely assigned to");
+ code_err(index->indexed, "This pointer might be null, so it can't be safely used as an assignment target");
return compile(env, ast);
}
container_t = value_type(container_t);