summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-inheritance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-inheritance.cpp')
-rw-r--r--source/slang/slang-check-inheritance.cpp3
1 files changed, 2 insertions, 1 deletions
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<Type*, SubtypeWitness*>* 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,