diff options
author | chriseth <chris@ethereum.org> | 2018-02-22 23:16:27 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-02 00:19:35 +0800 |
commit | a53d6b499d5cc5c45fc096cea6393dc285581f90 (patch) | |
tree | 751f9bf0eb4595df500214594865ab12c6bdb4a2 /libsolidity/analysis | |
parent | f2f61f1c2f3b4d553c07fcf1746f49e799cb7aa4 (diff) | |
download | dexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.tar.gz dexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.tar.zst dexon-solidity-a53d6b499d5cc5c45fc096cea6393dc285581f90.zip |
Use EVM version in type checker.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libsolidity/analysis/TypeChecker.h b/libsolidity/analysis/TypeChecker.h index 16796b63..2ba31232 100644 --- a/libsolidity/analysis/TypeChecker.h +++ b/libsolidity/analysis/TypeChecker.h @@ -22,6 +22,8 @@ #pragma once +#include <libsolidity/interface/EVMVersion.h> + #include <libsolidity/ast/Types.h> #include <libsolidity/ast/ASTAnnotations.h> #include <libsolidity/ast/ASTForward.h> @@ -43,7 +45,10 @@ class TypeChecker: private ASTConstVisitor { public: /// @param _errorReporter provides the error logging functionality. - TypeChecker(ErrorReporter& _errorReporter): m_errorReporter(_errorReporter) {} + TypeChecker(EVMVersion _evmVersion, ErrorReporter& _errorReporter): + m_evmVersion(_evmVersion), + m_errorReporter(_errorReporter) + {} /// Performs type checking on the given contract and all of its sub-nodes. /// @returns true iff all checks passed. Note even if all checks passed, errors() can still contain warnings @@ -132,6 +137,8 @@ private: ContractDefinition const* m_scope = nullptr; + EVMVersion m_evmVersion; + /// Flag indicating whether we are currently inside an EmitStatement. bool m_insideEmitStatement = false; |