Bug 199590
Summary: | [WHLSL] When there is ambiguity between a variable (of struct type) and an enum, we should resolve to the variable | ||
---|---|---|---|
Product: | WebKit | Reporter: | Robin Morisset <rmorisset> |
Component: | WebGPU | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Robin Morisset
e.g.:
```
struct Foo {
int bar;
}
enum x : int {
baz = 0;
bar = 1;
}
int f() {
Foo x;
return x.bar
}
```
Currently f() returns 1 in the implementation (from the enum) instead of 0 (from the zero-initialized struct).
This is against the spec, and from discussing this with Phil and the rest of the team, we agree that the behavior of the spec is more reasonable in that case.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
WHLSL is no longer relevant.