diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-02 17:20:56 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-02 17:22:58 +0800 |
commit | 454b470ceed799cb22ceaef6ea2b0bbea7165df9 (patch) | |
tree | 6d573811dfa7b52afa4096d796b97d82c0b9045c /libsolidity | |
parent | bd4c2b9bde02b94d367ad9af6e44b9434bb1bb93 (diff) | |
download | dexon-solidity-454b470ceed799cb22ceaef6ea2b0bbea7165df9.tar.gz dexon-solidity-454b470ceed799cb22ceaef6ea2b0bbea7165df9.tar.zst dexon-solidity-454b470ceed799cb22ceaef6ea2b0bbea7165df9.zip |
Suggest expressions of the form '0x1234 * 1 day' instead of hex numbers with unit denominations.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index 4ff0fb8f..cc7492dd 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -2041,12 +2041,14 @@ void TypeChecker::endVisit(Literal const& _literal) if (v050) m_errorReporter.fatalTypeError( _literal.location(), - "Hexadecimal numbers cannot be used with unit denominations." + "Hexadecimal numbers cannot be used with unit denominations. " + "You can use an expression of the form '0x1234 * 1 day' instead." ); else m_errorReporter.warning( _literal.location(), - "Hexadecimal numbers with unit denominations are deprecated." + "Hexadecimal numbers with unit denominations are deprecated. " + "You can use an expression of the form '0x1234 * 1 day' instead." ); } if (!_literal.annotation().type) |