From f8bf75cf1ae0aeee155996a917c2925bc500f3e2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 25 Oct 2023 07:45:23 -0700 Subject: Support generic interfaces. (#3278) * Initial support for generic interfaces. * Cleanup. * Add generic syntax for interfaces. --------- Co-authored-by: Yong He --- source/slang/slang-ast-type.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-ast-type.cpp') diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index a29ff9bb3..840aa4a67 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -636,9 +636,9 @@ Val* ExistentialSpecializedType::_substituteImplOverride(ASTBuilder* astBuilder, // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ThisType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -InterfaceDecl* ThisType::getInterfaceDecl() +DeclRef ThisType::getInterfaceDeclRef() { - return dynamicCast(getDeclRefBase()->getDecl()->parentDecl); + return DeclRef(getDeclRefBase()->getParent()).template as(); } // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AndType !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- cgit v1.2.3