mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Return TypeError is fixed point encoding is attempted.
This commit is contained in:
@@ -1482,7 +1482,16 @@ void TypeChecker::typeCheckABIEncodeFunctions(
|
||||
|
||||
if (argType->category() == Type::Category::RationalNumber)
|
||||
{
|
||||
if (!argType->mobileType())
|
||||
auto const& rationalType = dynamic_cast<RationalNumberType const&>(*argType);
|
||||
if (rationalType.isFractional())
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
arguments[i]->location(),
|
||||
"Fixed point numbers cannot yet be encoded."
|
||||
);
|
||||
continue;
|
||||
}
|
||||
else if (!argType->mobileType())
|
||||
{
|
||||
m_errorReporter.typeError(
|
||||
arguments[i]->location(),
|
||||
|
||||
Reference in New Issue
Block a user