Issue #823 - Change semantics of disabled attribute to not evaluate any of the parameters at run time

This commit is contained in:
gingerBill
2021-03-27 17:59:01 +00:00
parent 818942b72e
commit 8239cd34eb
2 changed files with 14 additions and 0 deletions

View File

@@ -7765,6 +7765,13 @@ irValue *ir_build_call_expr(irProcedure *proc, Ast *expr) {
}
}
Entity *proc_entity = entity_of_node(proc_expr);
if (proc_entity != nullptr) {
if (proc_entity->flags & EntityFlag_Disabled) {
return nullptr;
}
}
if (value == nullptr) {
value = ir_build_expr(proc, proc_expr);
}

View File

@@ -9198,6 +9198,13 @@ lbValue lb_build_call_expr(lbProcedure *p, Ast *expr) {
}
}
Entity *proc_entity = entity_of_node(proc_expr);
if (proc_entity != nullptr) {
if (proc_entity->flags & EntityFlag_Disabled) {
return {};
}
}
if (value.value == nullptr) {
value = lb_build_expr(p, proc_expr);
}