diff options
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index 22db4375a..66be88a1e 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -153,7 +153,10 @@ namespace Slang structAttribDef->ParentDecl->Members.add(attribDecl.Ptr()); structAttribDef->ParentDecl->memberDictionaryIsValid = false; // do necessary checks on this newly constructed node - checkDecl(attribDecl.Ptr()); + + // TODO: what check state is relevant here? + ensureDecl(attribDecl, DeclCheckState::Checked); + return attribDecl.Ptr(); } @@ -368,11 +371,14 @@ namespace Slang } else if (auto userDefAttr = as<UserDefinedAttribute>(attr)) { + // check arguments against attribute parameters defined in attribClassDecl Index paramIndex = 0; auto params = attribClassDecl->getMembersOfType<ParamDecl>(); for (auto paramDecl : params) { + ensureDecl(paramDecl, DeclCheckState::CanUseTypeOfValueDecl); + if (paramIndex < attr->args.getCount()) { auto & arg = attr->args[paramIndex]; |
