diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-06 20:59:37 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-08-13 20:27:01 +0800 |
commit | 7d7abeb1496dddfab7eb8705dbfc3d06284cf25d (patch) | |
tree | 2909fe73439256e0f77231ec219b1b9af6fefd5a /libsolidity/analysis | |
parent | 43db88b8363d73ee2f5ffa094ff506414261bd11 (diff) | |
download | dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar.gz dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar.bz2 dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar.lz dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar.xz dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.tar.zst dexon-solidity-7d7abeb1496dddfab7eb8705dbfc3d06284cf25d.zip |
Disallow ambiguous conversions between number literals and bytesXX types.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index bcc3757a..660bb828 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -2348,22 +2348,6 @@ void TypeChecker::expectType(Expression const& _expression, Type const& _expecte "." ); } - - if ( - type(_expression)->category() == Type::Category::RationalNumber && - _expectedType.category() == Type::Category::FixedBytes - ) - { - auto literal = dynamic_cast<Literal const*>(&_expression); - - if (literal && !literal->isHexNumber()) - m_errorReporter.warning( - _expression.location(), - "Decimal literal assigned to bytesXX variable will be left-aligned. " - "Use an explicit conversion to silence this warning." - ); - } - } void TypeChecker::requireLValue(Expression const& _expression) |