mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed msvc not expanding macros correctly
This commit is contained in:
parent
8e87e85937
commit
fd275b6d37
@ -3,6 +3,7 @@ cmake_policy(SET CMP0015 NEW)
|
||||
aux_source_directory(. SRC_LIST)
|
||||
list(REMOVE_ITEM SRC_LIST "./createRandomTest.cpp")
|
||||
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
include_directories(${CRYPTOPP_INCLUDE_DIRS})
|
||||
include_directories(${JSONCPP_INCLUDE_DIRS})
|
||||
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
|
||||
|
@ -52,17 +52,18 @@ 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;
|
||||
|
||||
// clang requires explicit initialization of map
|
||||
// http://stackoverflow.com/questions/17264067/chosen-constructor-is-explicit-in-copy-initialization-error-with-clang-4-2
|
||||
compiler.compileContract(*contract, {}, map<ContractDefinition const*, bytes const*>{});
|
||||
|
||||
// debug
|
||||
|
@ -95,10 +95,14 @@ bytes compileFirstExpression(const string& _sourceCode, vector<vector<string>> _
|
||||
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()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user