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 3c654a48b..6c414b292 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -3232,6 +3232,16 @@ namespace Slang _validateCrossModuleInheritance(decl, inheritanceDecl); } + + if (decl->findModifier<ComInterfaceAttribute>()) + { + // `associatedtype` declaration is not allowed in a COM interface declaration. + for (auto associatedType : decl->getMembersOfType<AssocTypeDecl>()) + { + getSink()->diagnose( + associatedType, Diagnostics::associatedTypeNotAllowInComInterface); + } + } } void SemanticsDeclBasesVisitor::visitStructDecl(StructDecl* decl) |
