From 638e5fb000d4e242a91e8b653da4a72daec0efda Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 28 Aug 2024 09:23:08 -0700 Subject: Make tuple types work in autodiff. (#4923) --- source/slang/slang-ast-builder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-ast-builder.cpp') diff --git a/source/slang/slang-ast-builder.cpp b/source/slang/slang-ast-builder.cpp index a13e13851..9879a4187 100644 --- a/source/slang/slang-ast-builder.cpp +++ b/source/slang/slang-ast-builder.cpp @@ -523,7 +523,7 @@ FuncType* ASTBuilder::getFuncType(ArrayView parameters, Type* result, Typ return getOrCreate(parameters, result, errorType); } -TupleType* ASTBuilder::getTupleType(List& types) +TupleType* ASTBuilder::getTupleType(ArrayView types) { // The canonical form of a tuple type is always a DeclRefType(GenAppDeclRef(TupleDecl, ConcreteTypePack(types...))). // If `types` is already a single ConcreteTypePack, then we can use that directly. @@ -536,7 +536,7 @@ TupleType* ASTBuilder::getTupleType(List& types) } // Otherwise, we need to create a ConcreteTypePack to hold the types. - auto typePack = getTypePack(types.getArrayView()); + auto typePack = getTypePack(types); return as(getSpecializedBuiltinType(typePack, "TupleType")); } -- cgit v1.2.3