-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move][move-2024][matching] Preserve int subject annotation during ma…
…tch pattern typing (#19973) ## Description Preserve int subject annotation during match pattern typing ## Test plan New tests pass --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information
Showing
5 changed files
with
30 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
external-crates/move/crates/move-compiler/tests/move_2024/matching/inferred_int_complex.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module a::m; | ||
|
||
fun t0() { | ||
let x = 2 + 5; | ||
match (x) { _ => {} } | ||
} | ||
|
||
fun t1() { | ||
match ({ 2 + 3 + 4}) { _ => {} } | ||
} | ||
|
||
fun t2() { | ||
match ({ let x = 2 + 3; x + 4}) { _ => {} } | ||
} |
5 changes: 5 additions & 0 deletions
5
...-crates/move/crates/move-compiler/tests/move_2024/matching/inferred_int_mut_ref_type.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module a::m; | ||
|
||
fun t() { | ||
match (&mut 10) { _ => {} } | ||
} |
5 changes: 5 additions & 0 deletions
5
...rnal-crates/move/crates/move-compiler/tests/move_2024/matching/inferred_int_ref_type.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module a::m; | ||
|
||
fun t() { | ||
match (&10) { _ => {} } | ||
} |
5 changes: 5 additions & 0 deletions
5
external-crates/move/crates/move-compiler/tests/move_2024/matching/inferred_int_subject.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module a::m; | ||
|
||
fun t() { | ||
match (10) { _ => {} } | ||
} |