aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index ca1118a30..331225d86 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -434,7 +434,7 @@ void check_proc_decl(Checker *c, Entity *e, DeclInfo *d) {
- if (d->scope->is_file && e->token.string == "main") {
+ if (d->scope->file != nullptr && e->token.string == "main") {
if (pt->param_count != 0 ||
pt->result_count != 0) {
gbString str = type_to_string(proc_type);