summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
-rw-r--r--source/slang/slang-ast-type.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index 7cfc6a67a..5056e5407 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -863,13 +863,7 @@ DeclRef<ThisTypeDecl> ExtractExistentialType::getThisTypeDeclRef()
SubtypeWitness* openedWitness = getSubtypeWitness();
- ThisTypeDecl* thisTypeDecl = nullptr;
- for (auto member : interfaceDecl->members)
- if (as<ThisTypeDecl>(member))
- {
- thisTypeDecl = as<ThisTypeDecl>(member);
- break;
- }
+ ThisTypeDecl* thisTypeDecl = interfaceDecl->getThisTypeDecl();
SLANG_ASSERT(thisTypeDecl);
DeclRef<ThisTypeDecl> specialiedInterfaceDeclRef =