diff options
| author | gingerBill <bill@gingerbill.org> | 2021-09-28 12:24:51 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-09-28 12:24:51 +0100 |
| commit | 6f872e04c85213406dcda52d3d8051f0a3022f6d (patch) | |
| tree | 06d73532aa236bbd9e8c2f90224fdd6a4dd18359 /src/check_expr.cpp | |
| parent | ea0bf057272d34b66c0403718d60d315aea7c369 (diff) | |
Move redundant `auto_cast` error from `-vet` to `-vet-extra`
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 13643b283..b8c600326 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -429,6 +429,7 @@ bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, Entity *base_ if (poly_proc_data) { poly_proc_data->gen_entity = entity; poly_proc_data->proc_info = proc_info; + entity->Procedure.generated_from_polymorphic = proc_info->generated_from_polymorphic; } // NOTE(bill): Check the newly generated procedure body @@ -7965,10 +7966,8 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type Type *type = type_of_expr(ac->expr); check_cast(c, o, type_hint); if (is_type_typed(type) && are_types_identical(type, type_hint)) { - if (build_context.vet) { + if (build_context.vet_extra) { error(node, "Redundant 'auto_cast' applied to expression"); - } else { - // warning(node, "Redundant 'auto_cast' applied to expression"); } } |