From 8f962894fd38edb47d782d303ac9ff87b3a3bb6a Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 4 Sep 2020 10:18:44 -0700 Subject: Allow mixing unspecialized and specialized existential parameters. (#1533) * Allow mixing unspecialized and specialized existential parameters. * Fixes. --- source/slang/slang-ast-builder.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/slang/slang-ast-builder.cpp') diff --git a/source/slang/slang-ast-builder.cpp b/source/slang/slang-ast-builder.cpp index ec4fd20f1..64061549e 100644 --- a/source/slang/slang-ast-builder.cpp +++ b/source/slang/slang-ast-builder.cpp @@ -100,6 +100,16 @@ Type* SharedASTBuilder::getEnumTypeType() return m_enumTypeType; } +Type* SharedASTBuilder::getDynamicType() +{ + if (!m_dynamicType) + { + auto dynamicTypeDecl = findMagicDecl("DynamicType"); + m_dynamicType = DeclRefType::create(m_astBuilder, makeDeclRef(dynamicTypeDecl)); + } + return m_dynamicType; +} + SharedASTBuilder::~SharedASTBuilder() { // Release built in types.. -- cgit v1.2.3