mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-02 03:02:37 +00:00
Fix crash caused by not checking for correct SOA kind on polymorphic parameters
This commit is contained in:
@@ -926,7 +926,8 @@ bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, Type *source,
|
||||
|
||||
case Type_Struct:
|
||||
if (source->kind == Type_Struct) {
|
||||
if (poly->Struct.soa_kind == source->Struct.soa_kind) {
|
||||
if (poly->Struct.soa_kind == source->Struct.soa_kind &&
|
||||
poly->Struct.soa_kind != StructSoa_None) {
|
||||
bool ok = is_polymorphic_type_assignable(c, poly->Struct.soa_elem, source->Struct.soa_elem, true, modify_type);
|
||||
if (ok) switch (source->Struct.soa_kind) {
|
||||
case StructSoa_Fixed:
|
||||
|
||||
Reference in New Issue
Block a user