aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-02-14 21:46:39 +0000
committergingerBill <bill@gingerbill.org>2018-02-14 21:46:39 +0000
commit6a85546b761b67fa012a2cd49e32b2211bf02971 (patch)
tree94cf871608248e467280490bf570199061792f7b /src/types.cpp
parent2e92d0c821a386ed67389e6b6cb932f2a697a445 (diff)
Fix #187
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index c40c076f1..2dcd05361 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -954,6 +954,14 @@ bool is_type_polymorphic_struct_specialized(Type *t) {
return false;
}
+bool is_type_polymorphic_struct_unspecialized(Type *t) {
+ t = base_type(t);
+ if (t->kind == Type_Struct) {
+ return t->Struct.is_polymorphic && !t->Struct.is_poly_specialized;
+ }
+ return false;
+}
+
bool is_type_polymorphic(Type *t) {
switch (t->kind) {