Browse Source

Simplified #assert check

Jeroen van Rijn 11 months ago
parent
commit
c1cb1a3d7e
1 changed files with 0 additions and 7 deletions
  1. 0 7
      src/check_builtin.cpp

+ 0 - 7
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())
 		// 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())
 		// 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) {
 		if (operand->type == nullptr || !is_type_boolean(operand->type) || operand->mode != Addressing_Constant) {
 			gbString str = expr_to_string(ce->args[0]);
 			gbString str = expr_to_string(ce->args[0]);
 			error(call, "'%s' is not a constant boolean", str);
 			error(call, "'%s' is not a constant boolean", str);