summaryrefslogtreecommitdiff
path: root/source/slang/ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2018-01-21 18:25:05 -0800
committerGitHub <noreply@github.com>2018-01-21 18:25:05 -0800
commit94fd60e27d396ccfc180222855d9bbe200117096 (patch)
tree8f9a4cf703e76f72a788acda841f6ec3ee6f3ba0 /source/slang/ir.cpp
parent41311209af4963f44acf34942d42828590d4b156 (diff)
parentf114c377f2cb7458fb8555151752f21d4d824e49 (diff)
Merge pull request #379 from tfoleyNV/generic-extension-fixes
Generic extension fixes
Diffstat (limited to 'source/slang/ir.cpp')
-rw-r--r--source/slang/ir.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/ir.cpp b/source/slang/ir.cpp
index 1d3c91979..b965f908c 100644
--- a/source/slang/ir.cpp
+++ b/source/slang/ir.cpp
@@ -4510,6 +4510,19 @@ namespace Slang
}
}
+ if( !newGenericDecl )
+ {
+ if(auto gd = dynamic_cast<GenericDecl*>(newDecl))
+ {
+ if( auto ed = gd->inner.As<ExtensionDecl>() )
+ {
+ // TODO: we should confirm that it is an extension for the correct type...
+
+ newGenericDecl = gd;
+ }
+ }
+ }
+
SLANG_ASSERT(newGenericDecl);
RefPtr<GenericSubstitution> newSubst = new GenericSubstitution();