mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 22:17:51 +00:00
Replace Type::(Is|As)I32 with Castable
Change-Id: Id130581f72e762bd398a4c1c509cdbe21739e750 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34267 Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
@@ -316,7 +316,7 @@ bool ValidatorImpl::ValidateSwitch(const ast::SwitchStatement* s) {
|
||||
}
|
||||
|
||||
auto* cond_type = s->condition()->result_type()->UnwrapAll();
|
||||
if (!(cond_type->IsI32() || cond_type->IsU32())) {
|
||||
if (!(cond_type->Is<ast::type::I32Type>() || cond_type->IsU32())) {
|
||||
add_error(s->condition()->source(), "v-0025",
|
||||
"switch statement selector expression must be of a "
|
||||
"scalar integer type");
|
||||
|
||||
Reference in New Issue
Block a user