From 786f456c2558f07c5a396e25ecb635a3c5480313 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Wed, 16 Apr 2025 03:18:58 +0000 Subject: Use the latest Ubuntu version not specific old version (#6825) * Use the latest Ubuntu version not specific old version --- source/slang/slang-check-decl.cpp | 6 ++++-- source/slang/slang-check-inheritance.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index da2300d8a..899b04b8b 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -7069,7 +7069,8 @@ bool SemanticsVisitor::checkInterfaceConformance( // the time we are compiling and handle those, and punt on the larger issue // for a bit longer. // - for (auto candidateExt : getCandidateExtensions(superInterfaceDeclRef, this)) + auto candidateExtensions = getCandidateExtensions(superInterfaceDeclRef, this); + for (const auto& candidateExt : candidateExtensions) { // We need to apply the extension to the interface type that our // concrete type is inheriting from. @@ -11272,7 +11273,8 @@ void _foreachDirectOrExtensionMemberOfType( if (auto aggTypeDeclRef = containerDeclRef.as()) { auto aggType = DeclRefType::create(semantics->getASTBuilder(), aggTypeDeclRef); - for (auto extDecl : getCandidateExtensions(aggTypeDeclRef, semantics)) + auto candidateExtensions = getCandidateExtensions(aggTypeDeclRef, semantics); + for (auto extDecl : candidateExtensions) { // Note that `extDecl` may have been declared for a type // base on the declaration that `aggTypeDeclRef` refers diff --git a/source/slang/slang-check-inheritance.cpp b/source/slang/slang-check-inheritance.cpp index cef9b6a09..37b4d3158 100644 --- a/source/slang/slang-check-inheritance.cpp +++ b/source/slang/slang-check-inheritance.cpp @@ -304,7 +304,8 @@ InheritanceInfo SharedSemanticsContext::_calcInheritanceInfo( Dictionary* additionalSubtypeWitness) { bool result = false; - for (auto extDecl : getCandidateExtensions(extensionTargetDeclRef, &visitor)) + auto candidateExtensions = getCandidateExtensions(extensionTargetDeclRef, &visitor); + for (auto extDecl : candidateExtensions) { // The list of *candidate* extensions is computed and // cached based on the identity of the declaration alone, -- cgit v1.2.3