aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-27 21:00:34 +0800
committerchriseth <chris@ethereum.org>2018-06-27 21:00:34 +0800
commit92cb4acd8a748ef2cf6a00a5a9f41975c23127c2 (patch)
tree87db1291c33d05fbf10113552689ff04e2044761 /libsolidity
parent4154e1480b7e350ac1cb1cb8591abe08fa90e0e4 (diff)
downloaddexon-solidity-92cb4acd8a748ef2cf6a00a5a9f41975c23127c2.tar.gz
dexon-solidity-92cb4acd8a748ef2cf6a00a5a9f41975c23127c2.tar.zst
dexon-solidity-92cb4acd8a748ef2cf6a00a5a9f41975c23127c2.zip
Also mention regular abi.encode in error message.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 9c4e9021..10953255 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1797,7 +1797,10 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
functionType->kind() == FunctionType::Kind::SHA256 ||
functionType->kind() == FunctionType::Kind::RIPEMD160
)
- msg += " This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.";
+ msg +=
+ " This function requires a single bytes argument."
+ " Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour"
+ " or abi.encode(...) to use ABI encoding.";
m_errorReporter.typeError(_functionCall.location(), msg);
}
else if (isPositionalCall)
@@ -1853,7 +1856,10 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
functionType->kind() == FunctionType::Kind::SHA256 ||
functionType->kind() == FunctionType::Kind::RIPEMD160
)
- msg += " This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values.";
+ msg +=
+ " This function requires a single bytes argument."
+ " Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour"
+ " or abi.encode(...) to use ABI encoding.";
m_errorReporter.typeError(arguments[i]->location(), msg);
}
}