Merge pull request #4172 from ethereum/trailing_dot

[BREAKING] Disallow trailing dot not followed by number
This commit is contained in:
chriseth
2018-05-30 18:51:52 +02:00
committed by GitHub
6 changed files with 46 additions and 1 deletions
@@ -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