forked from hyperledger-solang/solang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No version of Solidity supports octal numbers (hyperledger-solang#1604)
Signed-off-by: Sean Young <[email protected]>
- Loading branch information
Showing
4 changed files
with
39 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
contract C { | ||
int public test1 = 00; | ||
int public test2 = 0; | ||
int public test3 = 01e1; | ||
int public test4 = 09.1 * 10; | ||
int public test5 = -00; | ||
int public test6 = -0; | ||
int public test7 = -01e1; | ||
int public test8 = -09.1 * 10; | ||
} | ||
|
||
// ---- Expect: diagnostics ---- | ||
// error: 2:21-23: leading zeros not permitted, can be confused with octal | ||
// error: 4:21-25: leading zeros not permitted, can be confused with octal | ||
// error: 5:21-25: leading zeros not permitted, can be confused with octal | ||
// error: 6:21-24: leading zeros not permitted, can be confused with octal | ||
// error: 8:21-26: leading zeros not permitted, can be confused with octal | ||
// error: 9:22-26: leading zeros not permitted, can be confused with octal |
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