diff options
| author | gingerBill <bill@gingerbill.org> | 2021-11-14 15:12:37 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-11-14 15:12:37 +0000 |
| commit | 3f038428a7f282468011415db76da4bf08ddb67c (patch) | |
| tree | 70712155e0f94b43754fd8a28bf40939b8228d0f /src/check_type.cpp | |
| parent | b9701340b8faff107fe6a515d5de429141508f48 (diff) | |
Begin minimizing `Ast` size
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index 398967af8..b7feb562d 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1939,8 +1939,9 @@ bool check_procedure_type(CheckerContext *ctx, Type *type, Ast *proc_type_node, error(proc_type_node, "A procedure type with the #optional_second tag requires 2 return values, got %td", result_count); } else { bool ok = false; - if (proc_type_node->file && proc_type_node->file->pkg) { - ok = proc_type_node->file->pkg->scope == ctx->info->runtime_package->scope; + AstFile *file = proc_type_node->file(); + if (file && file->pkg) { + ok = file->pkg->scope == ctx->info->runtime_package->scope; } if (!ok) { |