summaryrefslogtreecommitdiff
path: root/source/slang/lower-to-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-02-20 23:55:51 -0500
committerGitHub <noreply@github.com>2018-02-20 23:55:51 -0500
commit01c4134d33cea3a4f98fad9248584278fd4bc452 (patch)
tree8ca6b0f7e844fbf56cb1991284aff3ebbcc8aa89 /source/slang/lower-to-ir.cpp
parent51cdcad24b5271ac8c0f816174c6a760e264ed9e (diff)
parent4cf46e5c8b2af8a4ea4db15cd402aae4145a614c (diff)
Merge pull request #417 from csyonghe/leakfix
Fix IR memory leaks.
Diffstat (limited to 'source/slang/lower-to-ir.cpp')
-rw-r--r--source/slang/lower-to-ir.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp
index 53cb2e772..b99e2713f 100644
--- a/source/slang/lower-to-ir.cpp
+++ b/source/slang/lower-to-ir.cpp
@@ -2870,6 +2870,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
if (parentDecl->ParentDecl)
witnessTable->genericDecl = dynamic_cast<GenericDecl*>(parentDecl->ParentDecl);
witnessTable->subTypeDeclRef = makeDeclRef(parentDecl);
+ witnessTable->subTypeDeclRef.substitutions = createDefaultSubstitutions(context->getSession(), parentDecl);
witnessTable->supTypeDeclRef = inheritanceDecl->base.type->AsDeclRefType()->declRef;
// Register the value now, rather than later, to avoid