From efc3f9916ec4217cd511f561166cb5f4348295c5 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 12 Apr 2024 12:30:16 +0100 Subject: [PATCH] Fix #3414 --- src/check_type.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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) {