diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-22 00:59:42 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-22 00:59:42 +0100 |
| commit | d72f4a8a79bbb229e0fcbb2c6cc439ba979a9453 (patch) | |
| tree | b61abe5404639be1350aeb5dbcc129167ca25ec8 | |
| parent | 91247a8fe15dd424e15cb9dac57fd2a743393fbd (diff) | |
Correct Multi Pointer Type handling in expressions
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index ea553f6bb..176685804 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -8486,6 +8486,7 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type case Ast_PolyType: case Ast_ProcType: case Ast_PointerType: + case Ast_MultiPointerType: case Ast_ArrayType: case Ast_DynamicArrayType: case Ast_StructType: @@ -8931,6 +8932,11 @@ gbString write_expr_to_string(gbString str, Ast *node, bool shorthand) { str = write_expr_to_string(str, pt->type, shorthand); case_end; + case_ast_node(pt, MultiPointerType, node); + str = gb_string_appendc(str, "[^]"); + str = write_expr_to_string(str, pt->type, shorthand); + case_end; + case_ast_node(at, ArrayType, node); str = gb_string_append_rune(str, '['); if (at->count != nullptr && |