aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-12-16 20:20:50 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-12-17 07:03:30 +0800
commit062b51e7bdf572abba25a76fc8c3bb6e96da71c9 (patch)
tree8ea9026902a73500d680dbf8e5dff4e1dba44c05 /AST.cpp
parent90e39c04d6e476491503573719c487744f529514 (diff)
downloaddexon-solidity-062b51e7bdf572abba25a76fc8c3bb6e96da71c9.tar.gz
dexon-solidity-062b51e7bdf572abba25a76fc8c3bb6e96da71c9.tar.zst
dexon-solidity-062b51e7bdf572abba25a76fc8c3bb6e96da71c9.zip
ForStatement typecheck and initExpression is a Statement
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();
}