checker: delay foreign block checking

if file scope, otherwise as before
This commit is contained in:
avanspector
2024-08-26 20:59:16 +02:00
parent c21bbae427
commit 43ec2b9253
3 changed files with 22 additions and 9 deletions

View File

@@ -6446,7 +6446,7 @@ gb_internal bool parse_file(Parser *p, AstFile *f) {
}
f->total_file_decl_count += calc_decl_count(stmt);
if (stmt->kind == Ast_WhenStmt || stmt->kind == Ast_ExprStmt || stmt->kind == Ast_ImportDecl) {
if (stmt->kind == Ast_WhenStmt || stmt->kind == Ast_ExprStmt || stmt->kind == Ast_ImportDecl || stmt->kind == Ast_ForeignBlockDecl) {
f->delayed_decl_count += 1;
}
}