Fix ir bugs: global variable names, untyped to any assignment

This commit is contained in:
Ginger Bill
2017-04-06 11:12:11 +01:00
parent 3e80411d37
commit c067a1f0ec
6 changed files with 52 additions and 25 deletions
+1 -2
View File
@@ -248,8 +248,7 @@ void check_proc_lit(Checker *c, Entity *e, DeclInfo *d) {
bool is_inline = (pd->tags & ProcTag_inline) != 0;
bool is_no_inline = (pd->tags & ProcTag_no_inline) != 0;
if ((d->scope->is_file || d->scope->is_global) &&
str_eq(e->token.string, str_lit("main"))) {
if (d->scope->is_file && str_eq(e->token.string, str_lit("main"))) {
if (proc_type != NULL) {
TypeProc *pt = &proc_type->Proc;
if (pt->param_count != 0 ||