mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactored NumberUnit and FunctionDefinition. Added OctalNumber. Fixed number followed by identifier with no whitespace.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint constant y = 1wei;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (32-33): Identifier-start is not allowed at end of a number.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint constant y = 8 gwei ether;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (39-44): Expected ';' but got 'ether'
|
||||
@@ -0,0 +1,3 @@
|
||||
function fallback() {}
|
||||
// ----
|
||||
// Warning 3445: (9-17): This function is named "fallback" but is not the fallback function of the contract. If you intend this to be a fallback function, use "fallback(...) { ... }" without the "function" keyword to define it.
|
||||
@@ -0,0 +1,3 @@
|
||||
function receive() {}
|
||||
// ----
|
||||
// Warning 3445: (9-16): This function is named "receive" but is not the receive function of the contract. If you intend this to be a receive function, use "receive(...) { ... }" without the "function" keyword to define it.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint x = 0x1000abcdefgh;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (26-38): Identifier-start is not allowed at end of a number.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint y = 01gwei;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (26-27): Octal numbers not allowed.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint y = 098;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (26-27): Octal numbers not allowed.
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint x = 0100;
|
||||
}
|
||||
// ----
|
||||
// ParserError 8936: (26-27): Octal numbers not allowed.
|
||||
Reference in New Issue
Block a user