diff options
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
| -rw-r--r-- | source/slang/slang-ast-type.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index 9b6b439ce..ee5d1d40e 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -772,10 +772,8 @@ DeclRef<InterfaceDecl> ExtractExistentialType::getSpecializedInterfaceDeclRef() SubtypeWitness* openedWitness = getSubtypeWitness(); - ThisTypeSubstitution* openedThisType = m_astBuilder->create<ThisTypeSubstitution>(); - openedThisType->outer = originalInterfaceDeclRef.getSubst(); - openedThisType->interfaceDecl = interfaceDecl; - openedThisType->witness = openedWitness; + ThisTypeSubstitution* openedThisType = m_astBuilder->getOrCreateThisTypeSubstitution( + interfaceDecl, openedWitness, originalInterfaceDeclRef.getSubst()); DeclRef<InterfaceDecl> specialiedInterfaceDeclRef = m_astBuilder->getSpecializedDeclRef<InterfaceDecl>(interfaceDecl, openedThisType); |
