allow top level declarations to be lazy

this case now works:

```zig
const A = struct {
    b: B,
};
const B = fn (A) void;
```
This commit is contained in:
Andrew Kelley
2019-08-23 14:07:34 -04:00
parent 20049caaba
commit 1dd658d1d0
5 changed files with 47 additions and 38 deletions

View File

@@ -8896,7 +8896,7 @@ static void gen_root_source(CodeGen *g) {
}
Tld *panic_tld = find_decl(g, &get_container_scope(import_with_panic)->base, buf_create_from_str("panic"));
assert(panic_tld != nullptr);
resolve_top_level_decl(g, panic_tld, nullptr);
resolve_top_level_decl(g, panic_tld, nullptr, false);
}