summaryrefslogtreecommitdiff
path: root/source/slang/lower-to-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-12-20 11:01:36 -0500
committerTim Foley <tfoleyNV@users.noreply.github.com>2017-12-20 08:01:36 -0800
commit8e0e6b64b934e161db297845ca55e66a3c248220 (patch)
tree9f20d566b7cc66f9de94ce455acdd680c2eacc12 /source/slang/lower-to-ir.cpp
parent563fc0cb8268a3e028f32b93ca94ff1c27cd1a10 (diff)
Support simple generics syntax (#319)
* Support simple generics syntax. This commit enables simpler generics syntax, e.g. T test<T>(T arg) {} or struct Gen<T>{T x;}; * Support simple generics syntax. This commit enables simpler generics syntax, e.g. T test<T>(T arg) {} or struct Gen<T>{T x;}; * add expected test result for compute/generics-syntax.slang
Diffstat (limited to 'source/slang/lower-to-ir.cpp')
-rw-r--r--source/slang/lower-to-ir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp
index 1e43a4d31..4ee717946 100644
--- a/source/slang/lower-to-ir.cpp
+++ b/source/slang/lower-to-ir.cpp
@@ -3446,6 +3446,8 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
{
if (auto innerFuncDecl = genDecl->inner->As<FuncDecl>())
return lowerFuncDecl(innerFuncDecl);
+ else if (auto innerStructDecl = genDecl->inner->As<StructDecl>())
+ return LoweredValInfo();
SLANG_RELEASE_ASSERT(false);
UNREACHABLE_RETURN(LoweredValInfo());
}