diff options
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 6a669cf425..3cb67ca03f 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -1879,7 +1879,7 @@ static void resolve_decl_fn(CodeGen *g, TldFn *tld_fn) { if (fn_def_node) g->fn_defs.append(fn_table_entry); - if (import == g->root_import && scope_is_root_decls(tld_fn->base.parent_scope)) { + if (g->have_pub_main && import == g->root_import && scope_is_root_decls(tld_fn->base.parent_scope)) { if (buf_eql_str(&fn_table_entry->symbol_name, "main")) { g->main_fn = fn_table_entry; |
