Make atomic compare related intrinsics optional ok

This commit is contained in:
gingerBill
2021-04-27 16:55:39 +01:00
parent f6d98d2a16
commit 24f2d97c0e
2 changed files with 34 additions and 22 deletions
+4 -4
View File
@@ -2017,8 +2017,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
}
}
operand->mode = Addressing_Value;
operand->type = make_optional_ok_type(default_type(x.type), false); // Just reusing this procedure, it's not optional
operand->mode = Addressing_OptionalOk;
operand->type = default_type(x.type);
}
break;
@@ -2149,8 +2149,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
check_assignment(c, &x, elem, builtin_name);
check_assignment(c, &y, elem, builtin_name);
operand->mode = Addressing_Value;
operand->type = make_optional_ok_type(elem, /*typed*/false);
operand->mode = Addressing_OptionalOk;
operand->type = elem;
break;
}
break;