mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4172 from ethereum/trailing_dot
[BREAKING] Disallow trailing dot not followed by number
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
contract test {
|
||||
uint256 a = 2.2e10;
|
||||
uint256 b = .5E10;
|
||||
uint256 c = 4.e-2;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (70-73): Member "e" not found or not visible after argument-dependent lookup in int_const 4
|
||||
@@ -0,0 +1,7 @@
|
||||
contract test {
|
||||
uint256 a = 2.2e10;
|
||||
uint256 b = .5E10;
|
||||
uint256 c = 2 + 2.;
|
||||
}
|
||||
// ----
|
||||
// ParserError: (76-77): Expected identifier but got ';'
|
||||
@@ -0,0 +1,4 @@
|
||||
contract test {
|
||||
uint a = 2.
|
||||
// ----
|
||||
// ParserError: (29-29): Expected identifier but got end of source
|
||||
Reference in New Issue
Block a user