diff options
author | chriseth <chris@ethereum.org> | 2017-12-30 21:35:45 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-04-12 19:09:37 +0800 |
commit | ae1d040285d97c2be0eb9d3e94a983975459f879 (patch) | |
tree | 6431baa6efc9e58f76fa8ae2dc1a9468388628ec /libsolidity/analysis/GlobalContext.cpp | |
parent | 3da16b3e8af41a1d743a94d2e19822e82440a63d (diff) | |
download | dexon-solidity-ae1d040285d97c2be0eb9d3e94a983975459f879.tar.gz dexon-solidity-ae1d040285d97c2be0eb9d3e94a983975459f879.tar.zst dexon-solidity-ae1d040285d97c2be0eb9d3e94a983975459f879.zip |
Allow error string for ``require``.
Diffstat (limited to 'libsolidity/analysis/GlobalContext.cpp')
-rw-r--r-- | libsolidity/analysis/GlobalContext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libsolidity/analysis/GlobalContext.cpp b/libsolidity/analysis/GlobalContext.cpp index 822674af..c58d99fb 100644 --- a/libsolidity/analysis/GlobalContext.cpp +++ b/libsolidity/analysis/GlobalContext.cpp @@ -51,6 +51,7 @@ m_magicVariables(vector<shared_ptr<MagicVariableDeclaration const>>{ make_shared<MagicVariableDeclaration>("mulmod", make_shared<FunctionType>(strings{"uint256", "uint256", "uint256"}, strings{"uint256"}, FunctionType::Kind::MulMod, false, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("now", make_shared<IntegerType>(256)), make_shared<MagicVariableDeclaration>("require", make_shared<FunctionType>(strings{"bool"}, strings{}, FunctionType::Kind::Require, false, StateMutability::Pure)), + make_shared<MagicVariableDeclaration>("require", make_shared<FunctionType>(strings{"bool", "string memory"}, strings{}, FunctionType::Kind::Require, false, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("revert", make_shared<FunctionType>(strings(), strings(), FunctionType::Kind::Revert, false, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("revert", make_shared<FunctionType>(strings{"string memory"}, strings(), FunctionType::Kind::Revert, false, StateMutability::Pure)), make_shared<MagicVariableDeclaration>("ripemd160", make_shared<FunctionType>(strings(), strings{"bytes20"}, FunctionType::Kind::RIPEMD160, true, StateMutability::Pure)), |