diff options
| author | gingerBill <bill@gingerbill.org> | 2024-05-03 14:51:02 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-05-03 14:51:02 +0100 |
| commit | 2201f365a1676f966fff5b9a79f0f56b5c1cf7ee (patch) | |
| tree | 240fc9e4283cf6f5abaf31b11f16d183945ee23c /src/check_type.cpp | |
| parent | f2505b096d7367e4a6aa66475cda81e9f9bc0dae (diff) | |
Allow `#no_alias` on multi-pointers
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index ab8c0b057..61c502a68 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2017,8 +2017,8 @@ gb_internal Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_para } if (p->flags&FieldFlag_no_alias) { - if (!is_type_pointer(type)) { - error(name, "'#no_alias' can only be applied pointer typed parameters"); + if (!is_type_pointer(type) && !is_type_multi_pointer(type)) { + error(name, "'#no_alias' can only be applied pointer or multi-pointer typed parameters"); p->flags &= ~FieldFlag_no_alias; // Remove the flag } } |