Skip to content

Commit

Permalink
Add Suggested Example for using an inline procedure which enables a…
Browse files Browse the repository at this point in the history
… target feature
  • Loading branch information
gingerBill committed Sep 12, 2024
1 parent 275f1cc commit 3166c7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/check_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8087,7 +8087,10 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c
GB_ASSERT(c->curr_proc_decl->entity->type->kind == Type_Proc);
String scope_features = c->curr_proc_decl->entity->type->Proc.enable_target_feature;
if (!check_target_feature_is_superset_of(scope_features, pt->Proc.enable_target_feature, &invalid)) {
ERROR_BLOCK();
error(call, "Inlined procedure enables target feature '%.*s', this requires the calling procedure to at least enable the same feature", LIT(invalid));

error_line("\tSuggested Example: @(enable_target_feature=\"%.*s\")\n", LIT(invalid));
}
}
}
Expand Down

0 comments on commit 3166c7b

Please sign in to comment.