diff --git a/src/tint/program_builder.h b/src/tint/program_builder.h index 5aeba3db9f..72ffdce294 100644 --- a/src/tint/program_builder.h +++ b/src/tint/program_builder.h @@ -974,13 +974,18 @@ class ProgramBuilder { /// @param source the source information /// @param value the boolean value /// @return a Scalar constructor for the given value - const ast::BoolLiteralExpression* Expr(const Source& source, bool value) { + template + std::enable_if_t, const ast::BoolLiteralExpression*> Expr( + const Source& source, + BOOL value) { return create(source, value); } /// @param value the boolean value /// @return a Scalar constructor for the given value - const ast::BoolLiteralExpression* Expr(bool value) { + template + std::enable_if_t, const ast::BoolLiteralExpression*> Expr( + BOOL value) { return create(value); } diff --git a/src/tint/resolver/call_validation_test.cc b/src/tint/resolver/call_validation_test.cc index 756ba5c91e..e1956aee0e 100644 --- a/src/tint/resolver/call_validation_test.cc +++ b/src/tint/resolver/call_validation_test.cc @@ -139,7 +139,7 @@ TEST_F(ResolverCallValidationTest, PointerArgument_AddressOfMemberAccessor) { Func("main", {}, ty.void_(), { Decl(Let("v", ty.Of(S), Construct(ty.Of(S)))), - CallStmt(Call("foo", AddressOf(Expr(Source{{12, 34}}, MemberAccessor("v", "m"))))), + CallStmt(Call("foo", AddressOf(MemberAccessor(Source{{12, 34}}, "v", "m")))), }); EXPECT_FALSE(r()->Resolve());