aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp8
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);