[wgsl-in] Function with missing return statement is sometimes accepted without an error #4395
Open
Description
This function is accepted, even though it doesn't return anything. Seems like it should be an error.
fn f() -> i32 {
let x = 1 + 1;
}
Strangely, it's only accepted in certain situations. If the let
is changed to var
or the expression is simplified to just 1
then it produces a validation error.
Metadata
Assignees
Labels
Type
Projects
Status
No status