diff options
| author | gingerBill <bill@gingerbill.org> | 2023-08-05 16:05:39 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-08-05 16:05:39 +0100 |
| commit | c91898a8889604617140ad15c70f4d68494fa0a1 (patch) | |
| tree | bf5f82b295f1751ce2e099a07edbfdfe175a7ddb /src/check_type.cpp | |
| parent | afa8eb2d6fdf1e3fd7278ee1623506984a150f15 (diff) | |
Remove #relative slices; Replace with #relative multi-pointers
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 4704f8b9b..cae3ba22e 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -2778,16 +2778,16 @@ gb_internal bool check_type_internal(CheckerContext *ctx, Ast *e, Type **type, T Type *relative_type = nullptr; Type *base_type = check_type(ctx, rt->type); - if (!is_type_pointer(base_type) && !is_type_slice(base_type)) { - error(rt->type, "#relative types can only be a pointer or slice"); + if (!is_type_pointer(base_type) && !is_type_multi_pointer(base_type)) { + error(rt->type, "#relative types can only be a pointer or multi-pointer"); relative_type = base_type; } else if (base_integer == nullptr) { relative_type = base_type; } else { if (is_type_pointer(base_type)) { relative_type = alloc_type_relative_pointer(base_type, base_integer); - } else if (is_type_slice(base_type)) { - relative_type = alloc_type_relative_slice(base_type, base_integer); + } else if (is_type_multi_pointer(base_type)) { + relative_type = alloc_type_relative_multi_pointer(base_type, base_integer); } } GB_ASSERT(relative_type != nullptr); |