mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-01 08:21:12 +00:00
Issue #823 - Change semantics of disabled attribute to not evaluate any of the parameters at run time
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user