aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-12-15 23:23:07 +0000
committergingerBill <bill@gingerbill.org>2020-12-15 23:23:07 +0000
commit5faa560f82eba49a862ee340b3b560a96044f868 (patch)
treebef2f3d6965433b66e2ef106350a6c2a05b12873 /src/types.cpp
parent6c2b93d5193f827c86c0cdd5938ceb91a6804397 (diff)
Make `container.Map` have similar semantics to the built-in `map` type
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index df87cb645..d79a3337a 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -1720,6 +1720,9 @@ TypeTuple *get_record_polymorphic_params(Type *t) {
bool is_type_polymorphic(Type *t, bool or_specialized=false) {
+ if (t == nullptr) {
+ return false;
+ }
if (t->flags & TypeFlag_InProcessOfCheckingPolymorphic) {
return false;
}