[naga wgsl-in] Apply automatic conversions to values being assigned. #6822
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Apply automatic conversions to the right-hand sides of assignment and
compound assignment statements.
Fix
try_automatic_conversion_for_leaf_scalar
to handle arrays,not just scalars, vectors, and matrices. Previously this was only used
for converting the right-hand sides of bit shift operators to
u32
,and bit shift operators don't support arrays. But now we're using
try_automatic_conversion_for_leaf_scalar
for ordinary assignments,and you can assign arrays.
Update a test of propagating source code spans through compaction.
This test needs validation to report an error, but this commit's fix
causes the error in the test to be detected in the front end, which is
too early to exercise compaction. Use a new error that the front end
still won't notice.