diff options
| author | gingerBill <bill@gingerbill.org> | 2024-04-12 12:30:16 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-04-12 12:30:16 +0100 |
| commit | efc3f9916ec4217cd511f561166cb5f4348295c5 (patch) | |
| tree | d46456b031b93e2d3d0059057eb9364c481d03ac /src/check_type.cpp | |
| parent | 95bc1892f5907758e73f03c91dba3d52c7be3f39 (diff) | |
Fix #3414
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index f1d991acb..f4e5d7c96 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -3233,6 +3233,11 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T Type *elem = t_invalid; Operand o = {}; + if (unparen_expr(pt->type) == nullptr) { + error(e, "Invalid pointer type"); + return false; + } + check_expr_or_type(&c, &o, pt->type); if (o.mode != Addressing_Invalid && o.mode != Addressing_Type) { if (o.mode == Addressing_Variable) { |