-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored NumberUnit and FunctionDefinition. Added OctalNumber. Fixe…
…d number followed by identifier with no whitespace.
- Loading branch information
1 parent
2ca349c
commit 9343b81
Showing
11 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/denominations/invalid_denomination_no_whitespace.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint constant y = 1wei; | ||
} | ||
// ---- | ||
// ParserError 8936: (32-33): Identifier-start is not allowed at end of a number. |
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/denominations/two_denominations_same_literal.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint constant y = 8 gwei ether; | ||
} | ||
// ---- | ||
// ParserError 2314: (39-44): Expected ';' but got 'ether' |
3 changes: 3 additions & 0 deletions
3
test/libsolidity/syntaxTests/freeFunctions/named_fallback_warning.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
3 changes: 3 additions & 0 deletions
3
test/libsolidity/syntaxTests/freeFunctions/named_receive_warning.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint x = 0x1000abcdefgh; | ||
} | ||
// ---- | ||
// ParserError 8936: (26-38): Identifier-start is not allowed at end of a number. |
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/literals/invalid_octal_denomination_no_whitespace.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint y = 01gwei; | ||
} | ||
// ---- | ||
// ParserError 8936: (26-27): Octal numbers not allowed. |
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/literals/invalid_octal_digits.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint y = 098; | ||
} | ||
// ---- | ||
// ParserError 8936: (26-27): Octal numbers not allowed. |
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/literals/invalid_octal_number.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
contract C { | ||
uint x = 0100; | ||
} | ||
// ---- | ||
// ParserError 8936: (26-27): Octal numbers not allowed. |