-
Notifications
You must be signed in to change notification settings - Fork 193
wgsl-in: Improve assignment diagnostics #2056
wgsl-in: Improve assignment diagnostics #2056
Conversation
@SparkyPotato This needs a rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get the examples you put in the PR description into the test suite. It seems like they'd fit well in tests/wgsl-errors.rs
, as a check
-based test.
The simplification to Error::Unexpected
is great. In the future, see if it's possible to separate out changes like that, that make a bunch of changes all over the place, into their own commits. This makes the series easier to review, because it makes it easier to see how simple the other changes are. But don't worry about that for this PR.
@SparkyPotato This looks fantastic, btw - thanks very much! |
5d4d291
to
7096e18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - thank you!
Okay, here's why I'll push a workaround for that. |
This improves the diagnostics on invalid assignment statements.
Fixes #2052.
Given:
Naga used to error with:
Now:
Given:
Naga used to error with:
Now:
Given:
Naga used to error with:
Now:
Given:
Naga used to error with:
Now:
Error
has breaking changes made to it.