aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-16 16:10:05 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-16 16:10:05 -0400
commite5f432d4c913b31922da5b2855237d37ceef0432 (patch)
tree420992617ce615cc7abd028b378be22645b4ce70 /compile.c
parentde49bc5bb3198f450cb367085f9def0d89782258 (diff)
Fix `not x` for optional values
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 9f9b0e9c..860c11b9 100644
--- a/compile.c
+++ b/compile.c
@@ -1865,7 +1865,7 @@ CORD compile(env_t *env, ast_t *ast)
}
case Not: {
ast_t *value = Match(ast, Not)->value;
- type_t *t = get_type(env, ast);
+ type_t *t = get_type(env, value);
binding_t *b = get_namespace_binding(env, value, "negated");
if (b && b->type->tag == FunctionType) {