diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-04-04 21:19:22 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-04-04 21:19:22 -0400 |
| commit | e30f713640be6590a81f23abe9571869469a5d35 (patch) | |
| tree | 892857fe5987a2cc827e3495bc7d9cf12f76e3b5 /src | |
| parent | 0edc2b19fe684355406d09c9195b353c630d99ed (diff) | |
| download | zig-e30f713640be6590a81f23abe9571869469a5d35.tar.gz zig-e30f713640be6590a81f23abe9571869469a5d35.zip | |
more accurate detection of pub main
Diffstat (limited to 'src')
| -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; |
