diff options
| author | gingerBill <bill@gingerbill.org> | 2022-09-07 11:09:32 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-09-07 11:09:32 +0100 |
| commit | 79b55d5e2b053992b4dfde9538672df22eda0751 (patch) | |
| tree | 2438ce5fc04941ac4560cc4398d7441c1de74320 /src | |
| parent | 0c9aaed9f741c3b96c63e0cbc9e4e11f4510248a (diff) | |
| parent | 82d5f48fa73f7221bfae53f467d0715c75a9df9a (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_type.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index da0a9706b..66417f97e 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1643,8 +1643,10 @@ Type *check_get_params(CheckerContext *ctx, Scope *scope, Ast *_params, bool *is bool valid = false; if (is_type_proc(op.type)) { Entity *proc_entity = entity_from_expr(op.expr); - valid = proc_entity != nullptr; - poly_const = exact_value_procedure(proc_entity->identifier.load() ? proc_entity->identifier.load() : op.expr); + valid = (proc_entity != nullptr) && (op.value.kind == ExactValue_Procedure); + if (valid) { + poly_const = exact_value_procedure(proc_entity->identifier.load() ? proc_entity->identifier.load() : op.expr); + } } if (!valid) { if (op.mode == Addressing_Constant) { |