aboutsummaryrefslogtreecommitdiffstats
path: root/solidityCompiler.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-17 06:45:24 +0800
committerChristian <c@ethdev.com>2014-12-17 06:49:02 +0800
commit5e148ae4b60efde4bfc87de726cf2f817df8a951 (patch)
treee7ec5ecdcc1f6abd939cf4b87ca50b02ba8dcaba /solidityCompiler.cpp
parent350953e598c26b4e403d11c927f6c74452d59a69 (diff)
downloaddexon-solidity-5e148ae4b60efde4bfc87de726cf2f817df8a951.tar.gz
dexon-solidity-5e148ae4b60efde4bfc87de726cf2f817df8a951.tar.zst
dexon-solidity-5e148ae4b60efde4bfc87de726cf2f817df8a951.zip
Fix: Resolve function types of all contracts before checking types inside functions.
Diffstat (limited to 'solidityCompiler.cpp')
-rw-r--r--solidityCompiler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/solidityCompiler.cpp b/solidityCompiler.cpp
index 29f61454..9ae8ff50 100644
--- a/solidityCompiler.cpp
+++ b/solidityCompiler.cpp
@@ -52,9 +52,13 @@ bytes compileContract(const string& _sourceCode)
resolver.registerDeclarations(*sourceUnit);
for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
- {
BOOST_REQUIRE_NO_THROW(resolver.resolveNamesAndTypes(*contract));
-
+ for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
+ if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ BOOST_REQUIRE_NO_THROW(resolver.checkTypeRequirements(*contract));
+ for (ASTPointer<ASTNode> const& node: sourceUnit->getNodes())
+ if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
+ {
Compiler compiler;
compiler.compileContract(*contract, {}, {});
// debug