diff options
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 3b7a975d1..2114746a3 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -8175,24 +8175,24 @@ ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *call, Ast *pr } switch (inlining) { - case ProcInlining_inline: { - if (proc != nullptr) { - Entity *e = entity_from_expr(proc); - if (e != nullptr && e->kind == Entity_Procedure) { - DeclInfo *decl = e->decl_info; - if (decl->proc_lit) { - ast_node(pl, ProcLit, decl->proc_lit); - if (pl->inlining == ProcInlining_no_inline) { - error(call, "'inline' cannot be applied to a procedure that has be marked as 'no_inline'"); - } + case ProcInlining_inline: { + if (proc != nullptr) { + Entity *e = entity_from_expr(proc); + if (e != nullptr && e->kind == Entity_Procedure) { + DeclInfo *decl = e->decl_info; + if (decl->proc_lit) { + ast_node(pl, ProcLit, decl->proc_lit); + if (pl->inlining == ProcInlining_no_inline) { + error(call, "'inline' cannot be applied to a procedure that has be marked as 'no_inline'"); } } } - break; } + break; + } - case ProcInlining_no_inline: - break; + case ProcInlining_no_inline: + break; } operand->expr = call; @@ -11019,10 +11019,10 @@ gbString write_expr_to_string(gbString str, Ast *node, bool shorthand) { case_ast_node(ce, CallExpr, node); switch (ce->inlining) { case ProcInlining_inline: - str = gb_string_appendc(str, "inline "); + str = gb_string_appendc(str, "#force_inline "); break; case ProcInlining_no_inline: - str = gb_string_appendc(str, "no_inline "); + str = gb_string_appendc(str, "#force_no_inline "); break; } |