aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/Assembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-22 23:16:27 +0800
committerchriseth <chris@ethereum.org>2018-03-02 00:19:35 +0800
commita53d6b499d5cc5c45fc096cea6393dc285581f90 (patch)
tree751f9bf0eb4595df500214594865ab12c6bdb4a2 /test/libsolidity/Assembly.cpp
parentf2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4 (diff)
downloaddexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.tar.gz
dexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.tar.zst
dexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.zip
Use EVM version in type checker.
Diffstat (limited to 'test/libsolidity/Assembly.cpp')
-rw-r--r--test/libsolidity/Assembly.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp
index 59af6d41..57a4f4e0 100644
--- a/test/libsolidity/Assembly.cpp
+++ b/test/libsolidity/Assembly.cpp
@@ -20,11 +20,9 @@
* Unit tests for Assembly Items from evmasm/Assembly.h
*/
-#include <string>
-#include <iostream>
-#include <boost/test/unit_test.hpp>
#include <libevmasm/SourceLocation.h>
#include <libevmasm/Assembly.h>
+
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/parsing/Parser.h>
#include <libsolidity/analysis/NameAndTypeResolver.h>
@@ -33,6 +31,11 @@
#include <libsolidity/analysis/TypeChecker.h>
#include <libsolidity/interface/ErrorReporter.h>
+#include <boost/test/unit_test.hpp>
+
+#include <string>
+#include <iostream>
+
using namespace std;
using namespace dev::eth;
@@ -46,7 +49,7 @@ namespace test
namespace
{
-eth::AssemblyItems compileContract(const string& _sourceCode)
+eth::AssemblyItems compileContract(string const& _sourceCode)
{
ErrorList errors;
ErrorReporter errorReporter(errors);
@@ -69,7 +72,7 @@ eth::AssemblyItems compileContract(const string& _sourceCode)
for (ASTPointer<ASTNode> const& node: sourceUnit->nodes())
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
{
- TypeChecker checker(errorReporter);
+ TypeChecker checker(EVMVersion{}, errorReporter);
BOOST_REQUIRE_NO_THROW(checker.checkTypeRequirements(*contract));
if (!Error::containsOnlyWarnings(errorReporter.errors()))
return AssemblyItems();