ww: keep generated test support file-scoped
This commit is contained in:
@@ -7655,15 +7655,18 @@ fn checkfile(c: *checker, file: *syntax.node) void = {
|
||||
// cstage cmd/wcc/check.c.
|
||||
if (c.istest != 0) {
|
||||
let present: bool = false;
|
||||
// The synthetic runner belongs to file.sourceid. An import in an
|
||||
// earlier module-reset section neither supplies nor uses its binding.
|
||||
let su: *syntax.node = file.list;
|
||||
for (su != nil) {
|
||||
if (c.testtarget.len > 0 && su.kind == syntax.nkind.N_USE
|
||||
&& su.imported == 0
|
||||
&& su.imported == 0 && su.sourceid == file.sourceid
|
||||
&& (syntax.streq(su.usepath, c.testtarget)
|
||||
|| syntax.streq(su.usepath, c.testmodule))) {
|
||||
su.used = 1i32;
|
||||
};
|
||||
if (su.kind == syntax.nkind.N_USE && su.imported == 0
|
||||
&& su.sourceid == file.sourceid
|
||||
&& syntax.streq(su.usepath, c.testmodule)) {
|
||||
present = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user