aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/AST.cpp b/AST.cpp
index c286c412..4c042f2c 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -132,8 +132,12 @@ void WhileStatement::checkTypeRequirements()
void ForStatement::checkTypeRequirements()
{
- // LTODO
- m_condExpression->expectType(BoolType());
+ if (m_initExpression)
+ m_initExpression->checkTypeRequirements();
+ if (m_condExpression)
+ m_condExpression->expectType(BoolType());
+ if (m_loopExpression)
+ m_loopExpression->checkTypeRequirements();
m_body->checkTypeRequirements();
}