diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-23 11:25:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-23 11:25:51 -0700 |
| commit | c9df734b836a503dbc09c48bfd54b35facd0f105 (patch) | |
| tree | 165ecf9668e2f25d71e4327dd24c5de7dfd698dc /source/slang/slang-check-stmt.cpp | |
| parent | a23adc221b1ea26db3f3313226b629eb9e308b0f (diff) | |
Allow anonymous struct. (#3822)
Diffstat (limited to 'source/slang/slang-check-stmt.cpp')
| -rw-r--r-- | source/slang/slang-check-stmt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/slang/slang-check-stmt.cpp b/source/slang/slang-check-stmt.cpp index b819945fd..b68465087 100644 --- a/source/slang/slang-check-stmt.cpp +++ b/source/slang/slang-check-stmt.cpp @@ -57,6 +57,15 @@ namespace Slang void SemanticsStmtVisitor::visitBlockStmt(BlockStmt* stmt) { + // Make sure to fully check all nested agg type decls first. + if (stmt->scopeDecl) + { + for (auto decl : stmt->scopeDecl->members) + { + if (as<AggTypeDeclBase>(decl)) + ensureAllDeclsRec(decl, DeclCheckState::DefinitionChecked); + } + } checkStmt(stmt->body); } |
