Fix not x
for optional values
This commit is contained in:
parent
de49bc5bb3
commit
e5f432d4c9
@ -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) {
|
||||
|
@ -315,3 +315,9 @@ func main():
|
||||
>> opt
|
||||
else:
|
||||
>> opt
|
||||
|
||||
>> not 5?
|
||||
= no
|
||||
|
||||
>> not !Int
|
||||
= yes
|
||||
|
Loading…
Reference in New Issue
Block a user