Naga: Should not be a structural type system #5796
Labels
area: validation
Issues related to validation, diagnostics, and error handling
naga
Shader Translator
type: bug
Something isn't working
Description
Currently naga will accept using a struct as another struct with the same layout.
Could it be that type checking only checks if the layout of a type is the same? And that aliases could be an issue, because they're represented as a copy of a given type in the naga::Module.
Repro steps
Add the following to
naga/tests/wgsl_errors.rs
. Naga creates a module and says it's valid, instead of throwing the expected error.Expected vs observed behavior
I expected it to match the Chrome behaviour of throwing an error.
Platform
The text was updated successfully, but these errors were encountered: