summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-03 12:18:47 -0700
committerGitHub <noreply@github.com>2024-05-03 12:18:47 -0700
commit47a917c964f4fda32d75f200efe863f6d68c737c (patch)
tree0957d915e937113af1322e5c0179012074fa7976 /source/slang/slang-lower-to-ir.cpp
parent13250ffa4d54c4e51b0a6473927e50a5da351ab3 (diff)
Fix `Ptr::__subscript` to accept any integer index. (#4100)
* Fix `Ptr::__subscript` to accept any integer index. * Fix `Ptr::__subscript` to allow 64bit indices.
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 2bf5f1e96..a8cf11cdc 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -10050,6 +10050,10 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
{
return ensureDecl(context, typedefDecl);
}
+ else if (auto subscriptDecl = as<SubscriptDecl>(genDecl->inner))
+ {
+ return ensureDecl(context, subscriptDecl);
+ }
SLANG_RELEASE_ASSERT(false);
UNREACHABLE_RETURN(LoweredValInfo());
}