diff options
| author | gingerBill <bill@gingerbill.org> | 2024-12-02 15:57:08 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-12-02 15:57:08 +0000 |
| commit | 65de0256ce173b92ff90c9ea9629aeadc9bb8538 (patch) | |
| tree | a1298ff952fc0338150e5272cb9bd183c8525800 /src | |
| parent | af8122e8c75cfd60990386c8dc48e5b5735552a5 (diff) | |
Fix #4535
Diffstat (limited to 'src')
| -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 dd0820fee..cc9483187 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4980,8 +4980,12 @@ gb_internal ExactValue get_constant_field_single(CheckerContext *c, ExactValue v if (success_) *success_ = true; if (finish_) *finish_ = false; return tav.value; + } else if (is_type_proc(tav.type)) { + if (success_) *success_ = true; + if (finish_) *finish_ = false; + return tav.value; } else { - GB_ASSERT(is_type_untyped_nil(tav.type)); + GB_ASSERT_MSG(is_type_untyped_nil(tav.type), "%s", type_to_string(tav.type)); if (success_) *success_ = true; if (finish_) *finish_ = false; return tav.value; |