From a58675b161d9fea8a73a6ded15e5a79b1fc020ef Mon Sep 17 00:00:00 2001 From: Julius Ikkala Date: Thu, 26 Jun 2025 19:49:11 +0300 Subject: Fix tuple AST & IR layout size queries (#7502) * Fix tuple AST & IR layout size queries * Don't peephole sizeof if size is still indeterminate --- source/slang/slang-ast-natural-layout.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/slang/slang-ast-natural-layout.cpp') diff --git a/source/slang/slang-ast-natural-layout.cpp b/source/slang/slang-ast-natural-layout.cpp index f15dee1d1..7643e0433 100644 --- a/source/slang/slang-ast-natural-layout.cpp +++ b/source/slang/slang-ast-natural-layout.cpp @@ -153,6 +153,12 @@ NaturalSize ASTNaturalLayoutContext::_calcSizeImpl(Type* type) // Initialize empty NaturalSize size = NaturalSize::makeEmpty(); + // We can't compute the size of an abstract type pack yet. + if (isAbstractTypePack(tupleType->getTypePack())) + { + return NaturalSize::makeInvalid(); + } + // Accumulate over all the member types for (auto cur = 0; cur < tupleType->getMemberCount(); cur++) { -- cgit v1.2.3