diff options
| author | gingerBill <bill@gingerbill.org> | 2018-02-18 14:37:58 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-02-18 14:37:58 +0000 |
| commit | 731dad480d705d3dd32a7ecb7bbb6c0d020e3a6b (patch) | |
| tree | b7970d487513bbc10c6ef04570fe1f001b7e068c /src | |
| parent | a0f2357cb37621a735be98a0966b6b90a29f6f0b (diff) | |
Fix issue regarding nullptr Type *
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index ebcd297db..fb9ff9013 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1946,7 +1946,8 @@ bool check_type_internal(Checker *c, AstNode *e, Type **type, Type *named_type) case Addressing_Type: { *type = o.type; if (!c->context.in_polymorphic_specialization) { - if (is_type_polymorphic_struct_unspecialized(o.type)) { + Type *t = base_type(o.type); + if (t != nullptr && is_type_polymorphic_struct_unspecialized(t)) { err_str = expr_to_string(e); error(e, "Invalid use of a non-specialized polymorphic type '%s'", err_str); } |