mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 06:27:54 +00:00
Migrate to using semantic::Expression
Remove the mutable `result_type` from the ast::Expression. Replace this with the use of semantic::Expression. Bug: tint:390 Change-Id: I1f0eaf0dce8fde46fefe50bf2c5fe5b2e4d2d2df Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39007 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
5c186625b6
commit
3335254c1c
@@ -44,6 +44,7 @@
|
||||
#include "src/ast/variable_decl_statement.h"
|
||||
#include "src/clone_context.h"
|
||||
#include "src/program_builder.h"
|
||||
#include "src/semantic/expression.h"
|
||||
#include "src/type/array_type.h"
|
||||
#include "src/type/matrix_type.h"
|
||||
#include "src/type/u32_type.h"
|
||||
@@ -70,7 +71,7 @@ ast::ArrayAccessorExpression* BoundArrayAccessors::Transform(
|
||||
ast::ArrayAccessorExpression* expr,
|
||||
CloneContext* ctx,
|
||||
diag::List* diags) {
|
||||
auto* ret_type = expr->array()->result_type()->UnwrapAll();
|
||||
auto* ret_type = ctx->src->Sem().Get(expr->array())->Type()->UnwrapAll();
|
||||
if (!ret_type->Is<type::Array>() && !ret_type->Is<type::Matrix>() &&
|
||||
!ret_type->Is<type::Vector>()) {
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user