aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis/TypeChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/analysis/TypeChecker.cpp')
-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);
}
}