From 4b284daeb0cc3f6df0835befad4326c81abeb374 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 9 Jan 2018 13:26:42 -0800 Subject: Support nested generics fixes #362 --- source/slang/emit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 41ae819d9..33328fbb1 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -4947,7 +4947,7 @@ emitDeclImpl(decl, nullptr); { auto type = inst->getType(); - if(type->As()) + if(type->As() && !type->As()) { // TODO: we need to be careful here, because // HLSL shader model 6 allows these as explicit @@ -6341,7 +6341,7 @@ emitDeclImpl(decl, nullptr); { // We don't want to declare generic functions, // because none of our targets actually support them. - if(func->genericDecl) + if(func->getGenericDecl()) return; // We also don't want to emit declarations for operations @@ -6453,7 +6453,7 @@ emitDeclImpl(decl, nullptr); EmitContext* ctx, IRFunc* func) { - if(func->genericDecl) + if(func->getGenericDecl()) { Emit("/* "); emitIRFuncDecl(ctx, func); @@ -7110,7 +7110,7 @@ emitDeclImpl(decl, nullptr); // Don't emit anything for a generic function, // since we only care about the types used by // the actual specializations. - if (irFunc->genericDecl) + if (irFunc->getGenericDecl()) return; emitIRUsedType(ctx, irFunc->getResultType()); -- cgit v1.2.3