From cb835b9596f78771dfd584aaa72aee7bc360b3d4 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:48:17 -0500 Subject: Fix issue with specialization using arithmetic expressions (#6084) --- source/slang/slang.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 5ec199658..efc1c6fd1 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1493,7 +1493,8 @@ DeclRef Linkage::specializeWithArgTypes( DiagnosticSink* sink) { SemanticsVisitor visitor(getSemanticsForReflection()); - visitor = visitor.withSink(sink); + SemanticsVisitor::ExprLocalScope scope; + visitor = visitor.withSink(sink).withExprLocalScope(&scope); SLANG_AST_BUILDER_RAII(getASTBuilder()); -- cgit v1.2.3