diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-23 11:43:32 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-23 11:43:32 +0000 |
| commit | 9246e89c4a0bb35048253c1c5bf6ea86c146b289 (patch) | |
| tree | 642ffb44bc68d0caad8117cd1f65a743465c6dc6 /src/types.cpp | |
| parent | 2e89585c8cca77b7863686032643fc92eed6599d (diff) | |
Fix #1328
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index c8bdbd72a..2b7ea93dc 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -697,6 +697,7 @@ Type * bit_set_to_int(Type *t); bool are_types_identical(Type *x, Type *y); bool is_type_pointer(Type *t); +bool is_type_proc(Type *t); bool is_type_slice(Type *t); bool is_type_integer(Type *t); bool type_set_offsets(Type *t); @@ -1284,6 +1285,10 @@ bool is_type_multi_pointer(Type *t) { t = base_type(t); return t->kind == Type_MultiPointer; } +bool is_type_internally_pointer_like(Type *t) { + return is_type_pointer(t) || is_type_multi_pointer(t) || is_type_cstring(t) || is_type_proc(t); +} + bool is_type_tuple(Type *t) { t = base_type(t); return t->kind == Type_Tuple; |