mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Promote gwei to a proper keyword.
This commit is contained in:
committed by
Leonardo Alt
parent
38c6ecbbe2
commit
c3e13b6733
@@ -430,7 +430,7 @@ BOOST_AUTO_TEST_CASE(ether_subdenominations)
|
||||
{
|
||||
Scanner scanner(CharStream("wei gwei ether", ""));
|
||||
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::SubWei);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::Identifier);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::SubGwei);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::SubEther);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
contract C {
|
||||
uint constant gwei = 1 gwei;
|
||||
uint constant x = 1 gwei;
|
||||
|
||||
function f() public view returns(uint) { return gwei; }
|
||||
function f() public view returns(uint) { return x; }
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
contract C {
|
||||
uint constant gwei = 1 gwei;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint constant gwei = 1;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (28-32): Expected identifier but got 'gwei'
|
||||
Reference in New Issue
Block a user