mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests for literal denominations with non-integer literals
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
address a = 0x11111122222333334444455555666667777788888 wei;
|
||||
}
|
||||
// ----
|
||||
// TypeError 5145: (26-73): Hexadecimal numbers cannot be used with unit denominations. You can use an expression of the form "0x1234 * 1 day" instead.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
bool constant x = true ether;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (37-42): Expected ';' but got 'ether'
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
string s = "abc" ether;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (31-36): Expected ';' but got 'ether'
|
||||
Reference in New Issue
Block a user