Skip to content

Commit

Permalink
phony assignment is not valid at module scope (#3876)
Browse files Browse the repository at this point in the history
  • Loading branch information
dneto0 authored Jul 25, 2024
1 parent 186f4d5 commit 16e822a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/webgpu/listing_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,7 @@
"webgpu:shader,validation,statement,increment_decrement:var_init_type:*": { "subcaseMS": 270.034 },
"webgpu:shader,validation,statement,loop:break_if_type:*": { "subcaseMS": 5.488 },
"webgpu:shader,validation,statement,loop:parse:*": { "subcaseMS": 16.168 },
"webgpu:shader,validation,statement,phony:module_scope:*": { "subcaseMS": 0.381 },
"webgpu:shader,validation,statement,phony:parse:*": { "subcaseMS": 149.639 },
"webgpu:shader,validation,statement,phony:rhs_constructible:*": { "subcaseMS": 244.513 },
"webgpu:shader,validation,statement,phony:rhs_with_decl:*": { "subcaseMS": 15.874 },
Expand Down
7 changes: 7 additions & 0 deletions src/webgpu/shader/validation/statement/phony.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,10 @@ fn f() {
}`;
t.expectCompileResult(kTests[t.params.test].pass, code);
});

g.test('module_scope')
.desc(`Phony assignment is not valid at module scope`)
.fn(t => {
const code = `_ = 1; `;
t.expectCompileResult(false, code);
});

0 comments on commit 16e822a

Please sign in to comment.