Bug 189755
Summary: | [WHLSL] Enum types with no zero value can’t be zero-initialized | ||
---|---|---|---|
Product: | WebKit | Reporter: | Thomas Denney <tdenney> |
Component: | WebGPU | Assignee: | Thomas Denney <tdenney> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | dino, jonlee, mmaxfield |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 189202 |
Thomas Denney
See EnumType.populateDefaultValue. Consider the enum type
enum A { B = 1, C = 2 }
Currently an A value will be initialized with zero, which isn’t a valid value of the enum. We need to specify this behavior, update the interpreter, and update the compiler.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Thomas Denney
Closing this because Checker verifies that an enum cannot be declared without a zero value.
Myles C. Maxfield
Migrated to https://github.com/gpuweb/WHLSL/issues/33