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:
parent
d8f663429f
commit
c96b760c47
@ -8,6 +8,7 @@ Compiler Features:
|
||||
|
||||
|
||||
Bugfixes:
|
||||
* TypeChecker: Return type error if fixed point encoding is attempted instead of throwing ``UnimplementedFeatureError``.
|
||||
* Yul: Check that arguments to ``dataoffset`` and ``datasize`` are literals at parse time and properly take this into account in the optimizer.
|
||||
* Yul: Parse number literals for detecting duplicate switch cases.
|
||||
* Yul: Require switch cases to have the same type.
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user