summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-modifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
-rw-r--r--source/slang/slang-check-modifier.cpp10
1 files changed, 9 insertions, 1 deletions
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<UnscopedEnumAttribute>(checkedAttr))
+ {
+ if (auto parentDecl = as<ContainerDecl>(getParentDecl(as<Decl>(syntaxNode))))
+ parentDecl->invalidateMemberDictionary();
+ return getASTBuilder()->create<TransparentModifier>();
+ }
+ return checkedAttr;
}
if (auto decl = as<Decl>(syntaxNode))