diff options
| author | Yong He <yonghe@outlook.com> | 2018-01-21 18:25:05 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-21 18:25:05 -0800 |
| commit | 94fd60e27d396ccfc180222855d9bbe200117096 (patch) | |
| tree | 8f9a4cf703e76f72a788acda841f6ec3ee6f3ba0 /source/slang/lower-to-ir.cpp | |
| parent | 41311209af4963f44acf34942d42828590d4b156 (diff) | |
| parent | f114c377f2cb7458fb8555151752f21d4d824e49 (diff) | |
Merge pull request #379 from tfoleyNV/generic-extension-fixes
Generic extension fixes
Diffstat (limited to 'source/slang/lower-to-ir.cpp')
| -rw-r--r-- | source/slang/lower-to-ir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp index 5d710725a..42d6dc303 100644 --- a/source/slang/lower-to-ir.cpp +++ b/source/slang/lower-to-ir.cpp @@ -3734,6 +3734,8 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> LoweredValInfo visitGenericDecl(GenericDecl * genDecl) { + // TODO: Should this just always visit/lower the inner decl? + if (auto innerFuncDecl = genDecl->inner->As<FuncDecl>()) return lowerFuncDecl(innerFuncDecl); else if (auto innerStructDecl = genDecl->inner->As<StructDecl>()) @@ -3741,6 +3743,10 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> visitAggTypeDecl(innerStructDecl); return LoweredValInfo(); } + else if( auto extensionDecl = genDecl->inner->As<ExtensionDecl>() ) + { + return visitExtensionDecl(extensionDecl); + } SLANG_RELEASE_ASSERT(false); UNREACHABLE_RETURN(LoweredValInfo()); } |
