From f5f0740be8102b4d719575d97b00dbd21b54ffbe Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 14 Mar 2024 14:45:57 -0700 Subject: Support unscoped enums. (#3771) --- source/slang/slang-check-modifier.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-check-modifier.cpp') diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index 6359096b9..eae993dc7 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -1173,7 +1173,15 @@ namespace Slang // the right syntax class to instantiate. // - return checkAttribute(hlslUncheckedAttribute, syntaxNode); + auto checkedAttr = checkAttribute(hlslUncheckedAttribute, syntaxNode); + + if (as(checkedAttr)) + { + if (auto parentDecl = as(getParentDecl(as(syntaxNode)))) + parentDecl->invalidateMemberDictionary(); + return getASTBuilder()->create(); + } + return checkedAttr; } if (auto decl = as(syntaxNode)) -- cgit v1.2.3