diff options
| author | gingerBill <bill@gingerbill.org> | 2024-01-28 23:50:31 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-01-28 23:50:31 +0000 |
| commit | 946cf52df1e6970b21e13ce01633aed40824678c (patch) | |
| tree | cd5716cdb6c4be9192f031b19d4e09410558cdb2 | |
| parent | 3c47503780bd99b547777b727baf502504244bbb (diff) | |
| parent | a78f062499c7f0112558872a500904e6fbc6761b (diff) | |
Merge branch 'master' into base-work
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index a6081a1cc..041bf1703 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2988,7 +2988,11 @@ gb_internal bool check_is_castable_to(CheckerContext *c, Operand *operand, Type } // proc <-> proc if (is_type_proc(src) && is_type_proc(dst)) { - if (is_type_polymorphic(src) || is_type_polymorphic(dst)) { + if (is_type_polymorphic(dst)) { + if (is_type_polymorphic(src) && + operand->mode == Addressing_Variable) { + return true; + } return false; } return true; |