diff options
| author | gingerBill <bill@gingerbill.org> | 2017-11-07 23:02:53 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-11-07 23:02:53 +0000 |
| commit | b1d1497f4be15453a2ccecf44d45d03ad7718853 (patch) | |
| tree | e2a580f46a971bb3b0a9b0b99e4b99e7374615e3 /src/types.cpp | |
| parent | 9df3a94d33a8bcada48d7c6b659de21a0edf6795 (diff) | |
Fix array of array arithmetic
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp index 66a56e3db..54ed86d52 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -835,6 +835,16 @@ Type *base_array_type(Type *t) { return t; } +Type *core_array_or_vector_type(Type *t) { + for (;;) { + Type *prev = t; + t = base_array_type(t); + t = base_vector_type(t); + if (prev == t) break; + } + return t; +} + Type *base_complex_elem_type(Type *t) { t = core_type(t); if (is_type_complex(t)) { |