diff options
Diffstat (limited to 'source/slang/slang-check-stmt.cpp')
| -rw-r--r-- | source/slang/slang-check-stmt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/slang/slang-check-stmt.cpp b/source/slang/slang-check-stmt.cpp index 9d1899462..faf25b716 100644 --- a/source/slang/slang-check-stmt.cpp +++ b/source/slang/slang-check-stmt.cpp @@ -76,10 +76,9 @@ 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) + for (auto aggDecl : stmt->scopeDecl->getDirectMemberDeclsOfType<AggTypeDeclBase>()) { - if (as<AggTypeDeclBase>(decl)) - ensureAllDeclsRec(decl, DeclCheckState::DefinitionChecked); + ensureAllDeclsRec(aggDecl, DeclCheckState::DefinitionChecked); } // Consider this code: |
