[wgsl-in] 0.0 / 0.0 should not be allowed
Wumpf opened this issue · comments
Spec says that NaN is generally not defined. I think Tint is right here and Naga should catch this as well as Tint does:
Tint WGSL reader failure: :80:17 error: '0.0 / 0.0' cannot be represented as 'abstract-float'
let a = 0.0 / 0.0;
For reference, this violates the WGSL spec for abstract numeric types:
An evaluation of an expression in one of these types must not overflow or produce infinite, NaN, undefined, or indeterminate results.
Kudos to @ben-clayton for pointing this out in Matrix.