-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Post-rebase fixes and test regenaration
- Loading branch information
Showing
26 changed files
with
217 additions
and
30 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
6 changes: 6 additions & 0 deletions
6
external-crates/move/crates/move-compiler/tests/development/enums/matching/at_patterns.exp
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
6 changes: 6 additions & 0 deletions
6
...crates/move/crates/move-compiler/tests/development/enums/matching/at_patterns_mut_ref.exp
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
6 changes: 6 additions & 0 deletions
6
...nal-crates/move/crates/move-compiler/tests/development/enums/matching/at_patterns_ref.exp
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
8 changes: 8 additions & 0 deletions
8
external-crates/move/crates/move-compiler/tests/development/enums/matching/invalid_at.exp
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
8 changes: 8 additions & 0 deletions
8
...-crates/move/crates/move-compiler/tests/development/enums/matching/invalid_match_unit.exp
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
60 changes: 60 additions & 0 deletions
60
...ates/move/crates/move-compiler/tests/development/enums/parser/invalid_mut_usage_match.exp
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 |
---|---|---|
@@ -1,6 +1,66 @@ | ||
error[E04016]: too few arguments | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:10:10 | ||
│ | ||
10 │ Option::Other { mut x: mut y } => y, | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Missing pattern for field 'x' in '0x42::m::Option::Other' | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:10:26 | ||
│ | ||
10 │ Option::Other { mut x: mut y } => y, | ||
│ ^^^ 'mut' modifier can only be used on variable bindings | ||
|
||
error[E03009]: unbound variable | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:10:44 | ||
│ | ||
10 │ Option::Other { mut x: mut y } => y, | ||
│ ^ Unbound variable 'y' | ||
|
||
error[E02010]: invalid name | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:11:33 | ||
│ | ||
11 │ Option::Other { x: mut y<u64> } => y, | ||
│ ^ Invalid type arguments on a pattern variable | ||
│ | ||
= Type arguments cannot appear on pattern variables | ||
|
||
error[E04016]: too few arguments | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:12:10 | ||
│ | ||
12 │ Option::Other { mut x: y } => y, | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^ Missing pattern for field 'x' in '0x42::m::Option::Other' | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:12:26 | ||
│ | ||
12 │ Option::Other { mut x: y } => y, | ||
│ ^^^ 'mut' modifier can only be used on variable bindings | ||
|
||
error[E03009]: unbound variable | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:12:40 | ||
│ | ||
12 │ Option::Other { mut x: y } => y, | ||
│ ^ Unbound variable 'y' | ||
|
||
warning[W09002]: unused variable | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:13:10 | ||
│ | ||
13 │ x @ mut Option::Some(true) => true, | ||
│ ^ Unused local variable 'x'. Consider removing or prefixing with an underscore: '_x' | ||
│ | ||
= This warning can be suppressed with '#[allow(unused_variable)]' applied to the 'module' or module member ('const', 'fun', or 'struct') | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:13:14 | ||
│ | ||
13 │ x @ mut Option::Some(true) => true, | ||
│ ^^^ Invalid 'mut' keyword on non-variable pattern | ||
|
||
error[E02010]: invalid name | ||
┌─ tests/development/enums/parser/invalid_mut_usage_match.move:14:10 | ||
│ | ||
14 │ mut Option::None => false, | ||
│ ^^^ ------------ This refers to a variant, not a variable binding | ||
│ │ | ||
│ 'mut' can only be used with variable bindings in patterns | ||
|
10 changes: 9 additions & 1 deletion
10
...tes/move/crates/move-compiler/tests/development/enums/parser/pattern_ellipsis_invalid.exp
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 |
---|---|---|
@@ -1,6 +1,14 @@ | ||
error[E01018]: invalid 'match' | ||
┌─ tests/development/enums/parser/pattern_ellipsis_invalid.move:9:9 | ||
│ | ||
9 │ ╭ match (x) { | ||
10 │ │ .. | ||
11 │ │ } | ||
│ ╰─────────^ Invalid 'match' form. 'match' must have at least one arm | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/development/enums/parser/pattern_ellipsis_invalid.move:10:13 | ||
│ | ||
10 │ .. | ||
│ ^^ Invalid pattern | ||
│ ^ Expected a call argument expression | ||
|
52 changes: 40 additions & 12 deletions
52
external-crates/move/crates/move-compiler/tests/move_2024/migration/match_okay.exp
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 |
---|---|---|
@@ -1,18 +1,46 @@ | ||
warning[W09002]: unused variable | ||
┌─ tests/move_2024/migration/match_okay.move:3:12 | ||
│ | ||
3 │ fun t1(t: u64, match: u64): bool { | ||
│ ^ Unused parameter 't'. Consider removing or prefixing with an underscore: '_t' | ||
│ | ||
= This warning can be suppressed with '#[allow(unused_variable)]' applied to the 'module' or module member ('const', 'fun', or 'struct') | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/move_2024/migration/match_okay.move:3:20 | ||
│ | ||
3 │ fun t1(t: u64, match: u64): bool { | ||
│ ^ Expected a function parameter | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/move_2024/migration/match_okay.move:5:5 | ||
│ | ||
5 │ } | ||
│ ^ | ||
│ │ | ||
│ Unexpected '}' | ||
│ Expected '(' | ||
|
||
warning[W09002]: unused variable | ||
┌─ tests/move_2024/migration/match_okay.move:7:12 | ||
│ | ||
7 │ fun t2(t: u64, match: u64): bool { | ||
│ ^ Unused parameter 't'. Consider removing or prefixing with an underscore: '_t' | ||
│ | ||
= This warning can be suppressed with '#[allow(unused_variable)]' applied to the 'module' or module member ('const', 'fun', or 'struct') | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/move_2024/migration/match_okay.move:3:19 | ||
┌─ tests/move_2024/migration/match_okay.move:7:20 | ||
│ | ||
3 │ fun t(t: u64, match: u64): bool { | ||
│ ^^^^^ | ||
│ │ | ||
│ Unexpected 'match' | ||
│ Expected an identifier | ||
7 │ fun t2(t: u64, match: u64): bool { | ||
│ ^ Expected a function parameter | ||
|
||
error[E01002]: unexpected token | ||
┌─ tests/move_2024/migration/match_okay.move:7:19 | ||
┌─ tests/move_2024/migration/match_okay.move:8:23 | ||
│ | ||
7 │ fun t(t: u64, match: u64): bool { | ||
│ ^^^^^ | ||
│ │ | ||
│ Unexpected 'match' | ||
│ Expected an identifier | ||
8 │ if (t == match) { true } else { false } | ||
│ ^ | ||
│ │ | ||
│ Unexpected ')' | ||
│ Expected '(' | ||
|
8 changes: 4 additions & 4 deletions
8
external-crates/move/crates/move-compiler/tests/move_2024/migration/match_okay.migration.exp
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- tests/move_2024/migration/match_okay.move | ||
+++ tests/move_2024/migration/match_okay.move | ||
@@ -3,2 +3,2 @@ | ||
- fun t(t: u64, match: u64): bool { | ||
- fun t1(t: u64, match: u64): bool { | ||
- t == match | ||
+ fun t(t: u64, `match`: u64): bool { | ||
+ fun t1(t: u64, `match`: u64): bool { | ||
+ t == `match` | ||
@@ -7,2 +7,2 @@ | ||
- fun t(t: u64, match: u64): bool { | ||
- fun t2(t: u64, match: u64): bool { | ||
- if (t == match) { true } else { false } | ||
+ fun t(t: u64, `match`: u64): bool { | ||
+ fun t2(t: u64, `match`: u64): bool { | ||
+ if (t == `match`) { true } else { false } |
4 changes: 2 additions & 2 deletions
4
external-crates/move/crates/move-compiler/tests/move_2024/migration/match_okay.move
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
Oops, something went wrong.