aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-09-29 21:35:59 +0100
committerGinger Bill <bill@gingerbill.org>2017-09-29 21:35:59 +0100
commit8c7cf0dbb0b4cf9730788c619c8cb9adf8f284a1 (patch)
tree4c1c42933a94a52a7eb7bed7868ffe0a985558bf /src/types.cpp
parente6e9375b091ad7ecf83be53a081e08ee87482118 (diff)
Fix union array bug (Issue #112)
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index dec7428eb..3aeb4f3e4 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -1037,6 +1037,13 @@ bool type_has_nil(Type *t) {
return false;
}
+bool elem_type_can_be_constant(Type *t) {
+ if (is_type_any(t) || is_type_union(t)) {
+ return false;
+ }
+ return true;
+}
+
bool is_type_comparable(Type *t) {
t = base_type(t);