-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28434 from ProvableHQ/long-ids
Update MSRV; disallow long IDs
- Loading branch information
Showing
22 changed files
with
121 additions
and
44 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
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
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
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
4 changes: 2 additions & 2 deletions
4
tests/expectations/compiler/function/inline_expr_statement.out
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
23 changes: 23 additions & 0 deletions
23
tests/expectations/parser/identifiers/long_identifier_fail.out
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,23 @@ | ||
namespace = "Parse" | ||
expectation = "Fail" | ||
outputs = [""" | ||
Error [EPAR0370044]: Identifier S012345678901234567890123456789q is too long (32 bytes; maximum is 31) | ||
--> test:19:12 | ||
| | ||
19 | struct S012345678901234567890123456789q { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Error [EPAR0370044]: Identifier m012345678901234567890123456789q is too long (32 bytes; maximum is 31) | ||
--> test:20:9 | ||
| | ||
20 | m012345678901234567890123456789q: u8, | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Error [EPAR0370044]: Identifier x012345678901234567890123456789q is too long (32 bytes; maximum is 31) | ||
--> test:23:14 | ||
| | ||
23 | function x012345678901234567890123456789q(y012345678901234567890123456789q: u8) -> u8 { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
Error [EPAR0370044]: Identifier y012345678901234567890123456789q is too long (32 bytes; maximum is 31) | ||
--> test:23:47 | ||
| | ||
23 | function x012345678901234567890123456789q(y012345678901234567890123456789q: u8) -> u8 { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"""] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
namespace = "Parse" | ||
expectation = "Fail" | ||
*/ | ||
|
||
program test.aleo { | ||
transition main() -> bool { | ||
return true; | ||
} | ||
|
||
// These identifiers are 31 characters long and should be fine. | ||
struct S012345678901234567890123456789 { | ||
m012345678901234567890123456789: u8, | ||
} | ||
|
||
function x012345678901234567890123456789(y012345678901234567890123456789: u8) -> u8 { | ||
let z012345678901234567890123456789: u8 = 1u8; | ||
return z012345678901234567890123456789 + y012345678901234567890123456789; | ||
} | ||
|
||
// These identifiers are 32 characters long and should fail. | ||
struct S012345678901234567890123456789q { | ||
m012345678901234567890123456789q: u8, | ||
} | ||
|
||
function x012345678901234567890123456789q(y012345678901234567890123456789q: u8) -> u8 { | ||
let z012345678901234567890123456789q: u8 = 1u8; | ||
return z012345678901234567890123456789q + y012345678901234567890123456789q; | ||
} | ||
} |
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