diff options
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 9c8f022ae..f965f9759 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -2985,6 +2985,16 @@ namespace Slang // For now we will just be harsh and require it // to be one of a few builtin types. validateEnumTagType(tagType, tagTypeInheritanceDecl->loc); + + // Note: The `InheritanceDecl` that introduces a tag + // type isn't actually representing a super-type of + // the `enum`, and things like name lookup need to + // know to ignore that "inheritance" relationship. + // + // We add a modifier to the `InheritanceDecl` to ensure + // that it can be detected and ignored by such steps. + // + addModifier(tagTypeInheritanceDecl, m_astBuilder->create<IgnoreForLookupModifier>()); } decl->tagType = tagType; |
