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.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/slang/slang-check-inheritance.cpp b/source/slang/slang-check-inheritance.cpp
index 37b4d3158..2554553de 100644
--- a/source/slang/slang-check-inheritance.cpp
+++ b/source/slang/slang-check-inheritance.cpp
@@ -450,14 +450,15 @@ InheritanceInfo SharedSemanticsContext::_calcInheritanceInfo(
// then we need to add the extension itself as a facet.
//
auto extDeclRef =
- createDefaultSubstitutionsIfNeeded(astBuilder, &visitor, extensionDecl);
- auto selfExtFacet = new (arena) Facet::Impl(
+ createDefaultSubstitutionsIfNeeded(astBuilder, &visitor, extensionDecl)
+ .as<ExtensionDecl>();
+ auto extInheritanceInfo = getInheritanceInfo(extDeclRef, circularityInfo);
+ addDirectBaseFacet(
Facet::Kind::Extension,
- Facet::Directness::Direct,
- extDeclRef,
selfType,
- astBuilder->getTypeEqualityWitness(selfType));
- allFacets.add(selfExtFacet);
+ selfIsSelf,
+ extDeclRef,
+ extInheritanceInfo);
}
}