aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-08-31 19:13:37 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-08-31 19:13:37 +0200
commitc1cb1a3d7e546bcb73a012eda04521d1adbb6366 (patch)
tree1140c226b903dd371cdf537203f69cdf29b35f7f /src
parenta4ac50a5b455a4ebc21806d4b9e0529b8a4b796c (diff)
Simplified #assert check
Diffstat (limited to 'src')
-rw-r--r--src/check_builtin.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index d2ad304bc..910e7ffdb 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -1795,13 +1795,6 @@ gb_internal bool check_builtin_procedure_directive(CheckerContext *c, Operand *o
// operand->type can be nil if the condition is a procedure, for example: #assert(assert())
// So let's check it before we use it, so we get the same error as if we wrote `#exists(assert())
- Ast *arg = ce->args[0];
- Entity *e = nullptr;
- Operand o = {};
- if (arg->kind == Ast_Ident) {
- e = check_ident(c, &o, arg, nullptr, nullptr, true);
- }
-
if (operand->type == nullptr || !is_type_boolean(operand->type) || operand->mode != Addressing_Constant) {
gbString str = expr_to_string(ce->args[0]);
error(call, "'%s' is not a constant boolean", str);