2018-08-03 14:13:52 +00:00
|
|
|
contract C {
|
|
|
|
function f() public pure {
|
|
|
|
uint D1 = 1234_;
|
|
|
|
uint D2 = 12__34;
|
|
|
|
uint D3 = 12_e34;
|
|
|
|
uint D4 = 12e_34;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-06-19 00:26:46 +00:00
|
|
|
// SyntaxError 2090: (56-61): Invalid use of underscores in number literal. No trailing underscores allowed.
|
|
|
|
// SyntaxError 2990: (77-83): Invalid use of underscores in number literal. Only one consecutive underscores between digits allowed.
|
|
|
|
// SyntaxError 6415: (99-105): Invalid use of underscores in number literal. No underscore at the end of the mantissa allowed.
|
|
|
|
// SyntaxError 6165: (121-127): Invalid use of underscores in number literal. No underscore in front of exponent allowed.
|