diff options
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
| -rw-r--r-- | source/slang/slang-check-conformance.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp index b95df520d..e77ea4981 100644 --- a/source/slang/slang-check-conformance.cpp +++ b/source/slang/slang-check-conformance.cpp @@ -301,19 +301,13 @@ namespace Slang // is a subtype of I. // We need to check and make sure the interface type of the `ExtractExistentialType` // is equal to `superType`. - auto interfaceDeclRef = extractExistentialType->interfaceDeclRef; - auto thisTypeSubst = findThisTypeSubstitution(interfaceDeclRef.substitutions.substitutions, interfaceDeclRef.getDecl()); - SLANG_ASSERT(thisTypeSubst && thisTypeSubst == interfaceDeclRef.substitutions.substitutions); - // The interfaceDeclRef in `extractExistentialType` contains a `ThisTypeSubstitution` - // to allow member lookup to return correct substituted types. Here we just need - // to know if that interface is the same as the superType, so we need to exclude - // the `ThisTypeSubstitution` from comparison. - interfaceDeclRef.substitutions.substitutions = thisTypeSubst->outer; + // + auto interfaceDeclRef = extractExistentialType->originalInterfaceDeclRef; if (interfaceDeclRef.equals(superTypeDeclRef)) { if (outWitness) { - *outWitness = thisTypeSubst->witness; + *outWitness = extractExistentialType->getSubtypeWitness(); } return true; } |
