diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/assert_function.exp b/third_party/move/move-compiler-v2/tests/deprecated/assert_function.exp similarity index 67% rename from third_party/move/move-compiler-v2/tests/more-v1/deprecated/assert_function.exp rename to third_party/move/move-compiler-v2/tests/deprecated/assert_function.exp index 503b675ee6b68b..d7fa408decb50d 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/assert_function.exp +++ b/third_party/move/move-compiler-v2/tests/deprecated/assert_function.exp @@ -1,7 +1,7 @@ Diagnostics: error: no function named `assert` found - ┌─ tests/more-v1/deprecated/assert_function.move:3:9 + ┌─ tests/deprecated/assert_function.move:3:9 │ 3 │ assert(true, 42); │ ^^^^^^^^^^^^^^^^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/assert_function.move b/third_party/move/move-compiler-v2/tests/deprecated/assert_function.move similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/deprecated/assert_function.move rename to third_party/move/move-compiler-v2/tests/deprecated/assert_function.move diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_valid.exp b/third_party/move/move-compiler-v2/tests/deprecated/deprecated_placement_basecase.exp similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_valid.exp rename to third_party/move/move-compiler-v2/tests/deprecated/deprecated_placement_basecase.exp diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.move b/third_party/move/move-compiler-v2/tests/deprecated/deprecated_placement_basecase.move similarity index 96% rename from third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.move rename to third_party/move/move-compiler-v2/tests/deprecated/deprecated_placement_basecase.move index 368cb7469e4735..3c3081c7870ceb 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.move +++ b/third_party/move/move-compiler-v2/tests/deprecated/deprecated_placement_basecase.move @@ -1,4 +1,3 @@ -#[deprecated] address 0x42 { module M { use 0x41::N; diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/double_annotation.exp b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.exp similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/double_annotation.exp rename to third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.exp diff --git a/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.move b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.move new file mode 100644 index 00000000000000..2c0e0883b3169c --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.move @@ -0,0 +1,9 @@ +//# run +script { + fun main(): () { + for/**/( i in 0..10) {}; + for/**/ ( i in 0..10) {}; + for /**/( i in 0..10) {}; + for /**/ ( i in 0..10) {}; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_valid.exp b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.exp similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_valid.exp rename to third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.exp diff --git a/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.move b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.move new file mode 100644 index 00000000000000..0b7b2778d6dc64 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.move @@ -0,0 +1,6 @@ +//# run +script { + fun main(): () { + for( i in 0..10) {}; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/control_flow/infinite_loop_with_dead_exits.exp b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/infinite_loop_with_dead_exits.exp index a93b1e0cf1bc34..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/control_flow/infinite_loop_with_dead_exits.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/control_flow/infinite_loop_with_dead_exits.exp @@ -1,13 +1,2 @@ -Diagnostics: -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/control_flow/infinite_loop_with_dead_exits.move:13:30 - │ -13 │ if (return) break; - │ -----------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - - ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.exp deleted file mode 100644 index c137632b654379..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.exp +++ /dev/null @@ -1,27 +0,0 @@ - -Diagnostics: -error: duplicate declaration, item, or annotation - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move:5:11 - │ -4 │ struct C { } - │ - Alias previously defined here -5 │ const C: u64 = 0; - │ ^ Duplicate module member or alias 'C'. Top level names in a namespace must be unique - -warning: unused alias - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move:12:15 - │ -12 │ use 0x42::mod1; - │ ^^^^ Unused 'use' of alias 'mod1'. Consider removing it - -warning: unused alias - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move:31:15 - │ -31 │ use 0x42::mod1; - │ ^^^^ Unused 'use' of alias 'mod1'. Consider removing it - -error: invalid name - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move:32:26 - │ -32 │ use 0x42::mod1::C as mod1; - │ ^^^^ Invalid constant alias name 'mod1'. Constant alias names must start with 'A'..'Z' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move deleted file mode 100644 index e700dd74e7aecb..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct.move +++ /dev/null @@ -1,44 +0,0 @@ -address 0x42 { -module mod1 { - #[deprecated] - struct C { } - const C: u64 = 0; - public fun mod1() {} -} -} - -address 0x41 { -module N { - use 0x42::mod1; - use 0x42::mod1::C as D; - use 0x42::mod1::C as C; - use 0x42::mod1::mod1; - - fun f1(): 0x42::mod1::C { - mod1(); - C; - { - use 0x42::mod1::C; - C - }; - D - } -} -} - - -script { - use 0x42::mod1; - use 0x42::mod1::C as mod1; - use 0x42::mod1::C as C; - use 0x42::mod1::mod1; - - fun f1(): 0x42::mod1::C { - mod1(); - C; - { - use 0x42::mod1::C; - C - } - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.exp deleted file mode 100644 index 29d61842638ca3..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.exp +++ /dev/null @@ -1,145 +0,0 @@ - -Diagnostics: -error: duplicate declaration, item, or annotation - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:5:11 - │ -3 │ struct C { } - │ - Alias previously defined here -4 │ #[deprecated] -5 │ const C: u64 = 0; - │ ^ Duplicate module member or alias 'C'. Top level names in a namespace must be unique - -warning: unused alias - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:12:15 - │ -12 │ use 0x42::mod1; - │ ^^^^ Unused 'use' of alias 'mod1'. Consider removing it - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:13:21 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -13 │ use 0x42::mod1::C as D; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:14:21 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -14 │ use 0x42::mod1::C as C; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:17:27 - │ - 4 │ #[deprecated] - │ ---------- Struct 'C' in module '0x42::mod1' deprecated here - · -17 │ fun f1(): 0x42::mod1::C { - │ ^ Use of deprecated struct 'C' from module '0x42::mod1' - -warning: Use of deprecated member - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:19:2 - │ - 4 │ #[deprecated] - │ ---------- Member 'C' in module '0x42::mod1' deprecated here - · -19 │ C; - │ ^ Use of deprecated member 'C' from module '0x42::mod1' - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:21:22 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -21 │ use 0x42::mod1::C; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -warning: Use of deprecated member - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:22:6 - │ - 4 │ #[deprecated] - │ ---------- Member 'C' in module '0x42::mod1' deprecated here - · -22 │ C - │ ^ Use of deprecated member 'C' from module '0x42::mod1' - -warning: Use of deprecated member - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:24:2 - │ - 4 │ #[deprecated] - │ ---------- Member 'C' in module '0x42::mod1' deprecated here - · -24 │ D - │ ^ Use of deprecated member 'C' from module '0x42::mod1' - -warning: unused alias - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:31:15 - │ -31 │ use 0x42::mod1; - │ ^^^^ Unused 'use' of alias 'mod1'. Consider removing it - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:32:21 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -32 │ use 0x42::mod1::C as mod1; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -error: invalid name - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:32:26 - │ -32 │ use 0x42::mod1::C as mod1; - │ ^^^^ Invalid constant alias name 'mod1'. Constant alias names must start with 'A'..'Z' - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:33:21 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -33 │ use 0x42::mod1::C as C; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:36:27 - │ - 4 │ #[deprecated] - │ ---------- Struct 'C' in module '0x42::mod1' deprecated here - · -36 │ fun f1(): 0x42::mod1::C { - │ ^ Use of deprecated struct 'C' from module '0x42::mod1' - -warning: Use of deprecated member - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:38:2 - │ - 4 │ #[deprecated] - │ ---------- Member 'C' in module '0x42::mod1' deprecated here - · -38 │ C; - │ ^ Use of deprecated member 'C' from module '0x42::mod1' - -warning: Use of deprecated constant - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:40:22 - │ - 4 │ #[deprecated] - │ ---------- Constant 'C' in module '0x42::mod1' deprecated here - · -40 │ use 0x42::mod1::C; - │ ^ Use of deprecated constant 'C' from module '0x42::mod1' - -warning: Use of deprecated member - ┌─ tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move:41:6 - │ - 4 │ #[deprecated] - │ ---------- Member 'C' in module '0x42::mod1' deprecated here - · -41 │ C - │ ^ Use of deprecated member 'C' from module '0x42::mod1' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move deleted file mode 100644 index faf1c9ff4b5184..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_constant_duplicated_struct2.move +++ /dev/null @@ -1,44 +0,0 @@ -address 0x42 { -module mod1 { - struct C { } - #[deprecated] - const C: u64 = 0; - public fun mod1() {} -} -} - -address 0x41 { -module N { - use 0x42::mod1; - use 0x42::mod1::C as D; - use 0x42::mod1::C as C; - use 0x42::mod1::mod1; - - fun f1(): 0x42::mod1::C { - mod1(); - C; - { - use 0x42::mod1::C; - C - }; - D - } -} -} - - -script { - use 0x42::mod1; - use 0x42::mod1::C as mod1; - use 0x42::mod1::C as C; - use 0x42::mod1::mod1; - - fun f1(): 0x42::mod1::C { - mod1(); - C; - { - use 0x42::mod1::C; - C - } - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.exp deleted file mode 100644 index 232d6a4e19b9f5..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.exp +++ /dev/null @@ -1,31 +0,0 @@ - -Diagnostics: -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_field_type.move:17:22 - │ - 3 │ #[deprecated] - │ ---------- Struct 'EventHandle' in module '0x42::event' deprecated here - · -17 │ use 0x42::event::EventHandle; - │ ^^^^^^^^^^^ Use of deprecated struct 'EventHandle' from module '0x42::event' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_field_type.move:27:25 - │ - 3 │ #[deprecated] - │ ---------- Struct 'EventHandle' in module '0x42::event' deprecated here - · -27 │ deposit_events: EventHandle, - │ ^^^^^^^^^^^ Use of deprecated struct 'EventHandle' from module '0x42::event' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_field_type.move:28:26 - │ - 3 │ #[deprecated] - │ ---------- Struct 'EventHandle' in module '0x42::event' deprecated here - · -28 │ withdraw_events: EventHandle, - │ ^^^^^^^^^^^ Use of deprecated struct 'EventHandle' from module '0x42::event' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.move deleted file mode 100644 index 7b8603579e6179..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type.move +++ /dev/null @@ -1,30 +0,0 @@ -module 0x42::event { - - #[deprecated] - /// A handle for an event such that: - /// 1. Other modules can emit events to this handle. - /// 2. Storage can use this handle to prove the total number of events that happened in the past. - struct EventHandle has store { - /// Total number of events emitted to this event stream. - counter: u64, - /// A globally unique ID for this event stream. - guid: u64, - } - -} - -module 0x41::coin { - use 0x42::event::EventHandle; - - struct Coin has store { } - struct CoinType has key {} - struct DepositEvent has drop, store {} - struct WithdrawEvent has drop, store {} - - struct CoinStore has key { - coin: Coin, - frozen: bool, - deposit_events: EventHandle, - withdraw_events: EventHandle, - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.exp deleted file mode 100644 index c5c33e8394476c..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.exp +++ /dev/null @@ -1,13 +0,0 @@ - -Diagnostics: -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_field_type2.move:29:38 - │ -22 │ #[deprecated] - │ ---------- Struct 'WithdrawEvent' in module '0x41::coin' deprecated here - · -29 │ withdraw_events: EventHandle, - │ ^^^^^^^^^^^^^ Use of deprecated struct 'WithdrawEvent' from module '0x41::coin' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.move deleted file mode 100644 index f21a61fedec9ab..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_field_type2.move +++ /dev/null @@ -1,31 +0,0 @@ -module 0x42::event { - - /// A handle for an event such that: - /// 1. Other modules can emit events to this handle. - /// 2. Storage can use this handle to prove the total number of events that happened in the past. - struct EventHandle has store { - /// Total number of events emitted to this event stream. - counter: u64, - /// A globally unique ID for this event stream. - guid: u64, - } - -} - -module 0x41::coin { - use 0x42::event::EventHandle; - - struct Coin has store { } - struct CoinType has key {} - struct DepositEvent has drop, store {} - - #[deprecated] - struct WithdrawEvent has drop, store {} - - struct CoinStore has key { - coin: Coin, - frozen: bool, - deposit_events: EventHandle, - withdraw_events: EventHandle, - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.exp deleted file mode 100644 index d0f2fd0c21140f..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address.exp +++ /dev/null @@ -1,22 +0,0 @@ - -Diagnostics: -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address.move:25:9 - │ - 1 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -25 │ use 0x42::M; - │ ^^^^^^^ Use of deprecated module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address.move:29:15 - │ - 1 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -29 │ let foo: S = M::foo(); - │ ^ Use of deprecated module '0x42::M' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.exp deleted file mode 100644 index d96feb00d65823..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.exp +++ /dev/null @@ -1,76 +0,0 @@ - -Diagnostics: -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:33:9 - │ - 1 │ #[deprecated] // Think about using 0x43 instead - │ ---------- Module '0x42::M' deprecated here - · -33 │ use 0x42::M; - │ ^^^^^^^ Use of deprecated module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:34:9 - │ -20 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -34 │ use 0x41::N::S; - │ ^^^^^^^ Use of deprecated module '0x41::N' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:34:18 - │ -22 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -34 │ use 0x41::N::S; - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:37:11 - │ -22 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -37 │ let foo: S = M::foo(); - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:37:15 - │ - 1 │ #[deprecated] // Think about using 0x43 instead - │ ---------- Module '0x42::M' deprecated here - · -37 │ let foo: S = M::foo(); - │ ^ Use of deprecated module '0x42::M' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:37:18 - │ -13 │ #[deprecated] - │ ---------- Function 'foo' in module '0x42::M' deprecated here - · -37 │ let foo: S = M::foo(); - │ ^^^ Use of deprecated function 'foo' from module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:38:2 - │ -20 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -38 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated module '0x41::N' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_address_module_members.move:38:11 - │ -28 │ #[deprecated] - │ ---------- Function 'consume' in module '0x41::N' deprecated here - · -38 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated function 'consume' from module '0x41::N' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.move deleted file mode 100644 index 361ac55d380425..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_address_module_members.move +++ /dev/null @@ -1,42 +0,0 @@ -#[deprecated] // Think about using 0x43 instead -address 0x42 { -#[deprecated] // Try module M2 -module M { - use 0x41::N; - - #[deprecated] - struct S {} - - #[deprecated] - const C: u64 = 0; - - #[deprecated] - public fun foo(): N::S { let _foo = C + 3; N::bar() } - - spec foo {} -} -} - -#[deprecated] -module 0x41::N { - #[deprecated] - struct S has drop { } - - #[deprecated] - public fun bar(): S { S { } } - - #[deprecated] - public fun consume(_x: S) { } -} - -script { - use 0x42::M; - use 0x41::N::S; - - fun main() { - let foo: S = M::foo(); - 0x41::N::consume(foo); - } - - spec main { } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.exp deleted file mode 100644 index ab4325eeea366e..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.exp +++ /dev/null @@ -1,40 +0,0 @@ - -Diagnostics: -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_members.move:31:18 - │ -19 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -31 │ use 0x41::N::S; - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_members.move:34:11 - │ -19 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -34 │ let foo: S = M::foo(); - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_members.move:34:18 - │ -11 │ #[deprecated] - │ ---------- Function 'foo' in module '0x42::M' deprecated here - · -34 │ let foo: S = M::foo(); - │ ^^^ Use of deprecated function 'foo' from module '0x42::M' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_members.move:35:11 - │ -25 │ #[deprecated] - │ ---------- Function 'consume' in module '0x41::N' deprecated here - · -35 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated function 'consume' from module '0x41::N' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.move deleted file mode 100644 index c05b48447a29af..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_members.move +++ /dev/null @@ -1,39 +0,0 @@ -address 0x42 { -module M { - use 0x41::N; - - #[deprecated] - struct S {} - - #[deprecated] - const C: u64 = 0; - - #[deprecated] - public fun foo(): N::S { let _foo = C + 3; N::bar() } - - spec foo {} -} -} - -module 0x41::N { - #[deprecated] - struct S has drop { } - - #[deprecated] - public fun bar(): S { S { } } - - #[deprecated] - public fun consume(_x: S) { } -} - -script { - use 0x42::M; - use 0x41::N::S; - - fun main() { - let foo: S = M::foo(); - 0x41::N::consume(foo); - } - - spec main { } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.exp deleted file mode 100644 index acf06508493dcf..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.exp +++ /dev/null @@ -1,22 +0,0 @@ - -Diagnostics: -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module.move:25:9 - │ - 2 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -25 │ use 0x42::M; - │ ^^^^^^^ Use of deprecated module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module.move:29:15 - │ - 2 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -29 │ let foo: S = M::foo(); - │ ^ Use of deprecated module '0x42::M' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.move deleted file mode 100644 index 7f2041ed6215af..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module.move +++ /dev/null @@ -1,34 +0,0 @@ -address 0x42 { -#[deprecated] -module M { - use 0x41::N; - - struct S {} - - const C: u64 = 0; - - public fun foo(): N::S { let _foo = C + 3; N::bar() } - - spec foo {} -} -} - -module 0x41::N { - struct S has drop { } - - public fun bar(): S { S { } } - - public fun consume(_x: S) { } -} - -script { - use 0x42::M; - use 0x41::N::S; - - fun main() { - let foo: S = M::foo(); - 0x41::N::consume(foo); - } - - spec main { } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.exp deleted file mode 100644 index a7f6d2a94dfb0f..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.exp +++ /dev/null @@ -1,49 +0,0 @@ - -Diagnostics: -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module2.move:3:9 - │ - 3 │ use 0x41::N; - │ ^^^^^^^ Use of deprecated module '0x41::N' - · -15 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module2.move:9:23 - │ - 9 │ public fun foo(): N::S { let _foo = C + 3; N::bar() } - │ ^ Use of deprecated module '0x41::N' - · -15 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module2.move:9:48 - │ - 9 │ public fun foo(): N::S { let _foo = C + 3; N::bar() } - │ ^ Use of deprecated module '0x41::N' - · -15 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module2.move:26:9 - │ -15 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -26 │ use 0x41::N::S; - │ ^^^^^^^ Use of deprecated module '0x41::N' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module2.move:30:2 - │ -15 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -30 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated module '0x41::N' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.move deleted file mode 100644 index a1a98631b86d8f..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module2.move +++ /dev/null @@ -1,34 +0,0 @@ -address 0x42 { -module M { - use 0x41::N; - - struct S {} - - const C: u64 = 0; - - public fun foo(): N::S { let _foo = C + 3; N::bar() } - - spec foo {} -} -} - -#[deprecated] -module 0x41::N { - struct S has drop { } - - public fun bar(): S { S { } } - - public fun consume(_x: S) { } -} - -script { - use 0x42::M; - use 0x41::N::S; - - fun main() { - let foo: S = M::foo(); - 0x41::N::consume(foo); - } - - spec main { } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.exp deleted file mode 100644 index 2cb940362c35f3..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.exp +++ /dev/null @@ -1,76 +0,0 @@ - -Diagnostics: -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:32:9 - │ - 2 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -32 │ use 0x42::M; - │ ^^^^^^^ Use of deprecated module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:33:9 - │ -19 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -33 │ use 0x41::N::S; - │ ^^^^^^^ Use of deprecated module '0x41::N' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:33:18 - │ -21 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -33 │ use 0x41::N::S; - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated struct - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:36:11 - │ -21 │ #[deprecated] - │ ---------- Struct 'S' in module '0x41::N' deprecated here - · -36 │ let foo: S = M::foo(); - │ ^ Use of deprecated struct 'S' from module '0x41::N' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:36:15 - │ - 2 │ #[deprecated] - │ ---------- Module '0x42::M' deprecated here - · -36 │ let foo: S = M::foo(); - │ ^ Use of deprecated module '0x42::M' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:36:18 - │ -12 │ #[deprecated] - │ ---------- Function 'foo' in module '0x42::M' deprecated here - · -36 │ let foo: S = M::foo(); - │ ^^^ Use of deprecated function 'foo' from module '0x42::M' - -warning: Use of deprecated module - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:37:2 - │ -19 │ #[deprecated] - │ ---------- Module '0x41::N' deprecated here - · -37 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated module '0x41::N' - -warning: Use of deprecated function - ┌─ tests/more-v1/deprecated/deprecated_placement_module_members.move:37:11 - │ -27 │ #[deprecated] - │ ---------- Function 'consume' in module '0x41::N' deprecated here - · -37 │ 0x41::N::consume(foo); - │ ^^^^^^^ Use of deprecated function 'consume' from module '0x41::N' - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.move deleted file mode 100644 index e3b71a074b3415..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/deprecated_placement_module_members.move +++ /dev/null @@ -1,41 +0,0 @@ -address 0x42 { -#[deprecated] -module M { - use 0x41::N; - - #[deprecated] - struct S {} - - #[deprecated] - const C: u64 = 0; - - #[deprecated] - public fun foo(): N::S { let _foo = C + 3; N::bar() } - - spec foo {} -} -} - -#[deprecated] -module 0x41::N { - #[deprecated] - struct S has drop { } - - #[deprecated] - public fun bar(): S { S { } } - - #[deprecated] - public fun consume(_x: S) { } -} - -script { - use 0x42::M; - use 0x41::N::S; - - fun main() { - let foo: S = M::foo(); - 0x41::N::consume(foo); - } - - spec main { } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.exp b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.exp deleted file mode 100644 index 511ecff116506e..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.exp +++ /dev/null @@ -1,13 +0,0 @@ - -Diagnostics: -warning: DEPRECATED. will be removed - ┌─ tests/more-v1/deprecated/public_script.move:2:5 - │ -2 │ public(script) fun main() { - │ ^^^^^^^^^^^^^^ 'public(script)' is deprecated in favor of the 'entry' modifier. Replace with 'public entry' - -error: address with no value - ┌─ tests/more-v1/deprecated/public_script.move:4:30 - │ -4 │ let _addr:address = @Test; - │ ^^^^ address 'Test' is not assigned a value. Try assigning it a value when calling the compiler diff --git a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.move b/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.move deleted file mode 100644 index d225e0f5255260..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/deprecated/public_script.move +++ /dev/null @@ -1,6 +0,0 @@ -module 0x1::Test { - public(script) fun main() { - // Previously, deprecation plus an error led to a compiler assert. Make sure that doesn't come back. - let _addr:address = @Test; - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/expansion/assign_non_simple_name.exp b/third_party/move/move-compiler-v2/tests/more-v1/expansion/assign_non_simple_name.exp index 2150bef394055b..eb7b73c8908fb0 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/expansion/assign_non_simple_name.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/expansion/assign_non_simple_name.exp @@ -1,5 +1,11 @@ Diagnostics: +warning: unused alias + ┌─ tests/more-v1/expansion/assign_non_simple_name.move:6:15 + │ +6 │ use 0x42::X; + │ ^ Unused 'use' of alias 'X'. Consider removing it + error: syntax item restricted to spec contexts ┌─ tests/more-v1/expansion/assign_non_simple_name.move:16:9 │ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/expansion/duplicate_field.exp b/third_party/move/move-compiler-v2/tests/more-v1/expansion/duplicate_field.exp index 4ed50afb8f5cb3..eac872b145ed55 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/expansion/duplicate_field.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/expansion/duplicate_field.exp @@ -6,4 +6,4 @@ error: duplicate declaration, item, or annotation 3 │ f: u64, │ - Field previously defined here 4 │ f: u64, - │ ^ Duplicate definition for field 'f' in struct 'S' + │ ^ Duplicate definition for field 'f' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/expansion/invalid_local_name.exp b/third_party/move/move-compiler-v2/tests/more-v1/expansion/invalid_local_name.exp index 0419d9c0b0102f..5262c25d270cab 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/expansion/invalid_local_name.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/expansion/invalid_local_name.exp @@ -6,18 +6,6 @@ error: invalid name 4 │ fun t(No: u64) { │ ^^ Invalid local variable name 'No'. Local variable names must start with 'a'..'z' (or '_') -error: invalid name - ┌─ tests/more-v1/expansion/invalid_local_name.move:9:13 - │ -9 │ let No; - │ ^^ Invalid local variable name 'No'. Local variable names must start with 'a'..'z' (or '_') - -error: invalid name - ┌─ tests/more-v1/expansion/invalid_local_name.move:14:13 - │ -14 │ let No = 100; - │ ^^ Invalid local variable name 'No'. Local variable names must start with 'a'..'z' (or '_') - error: invalid use of reserved name ┌─ tests/more-v1/expansion/invalid_local_name.move:23:13 │ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/expansion/unbound_module_alias_in_type.exp b/third_party/move/move-compiler-v2/tests/more-v1/expansion/unbound_module_alias_in_type.exp index 4b90774ab5d0d4..6749e935f7fc20 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/expansion/unbound_module_alias_in_type.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/expansion/unbound_module_alias_in_type.exp @@ -4,4 +4,4 @@ error: unbound module ┌─ tests/more-v1/expansion/unbound_module_alias_in_type.move:2:16 │ 2 │ fun foo(x: X::T) {} - │ ^ Unbound module alias 'X' + │ ^ Unbound module or type alias 'X' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/expansion/use_nested_self_as_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/expansion/use_nested_self_as_invalid.exp index 2caed30a908e15..a3917dfeee3f38 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/expansion/use_nested_self_as_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/expansion/use_nested_self_as_invalid.exp @@ -6,14 +6,8 @@ warning: unused alias 8 │ use 0x2::X::{Self as B, foo, S}; │ ^ Unused 'use' of alias 'B'. Consider removing it -error: unbound module - ┌─ tests/more-v1/expansion/use_nested_self_as_invalid.move:10:19 - │ -10 │ struct X { f: X::S, f2: S } - │ ^ Unbound module alias 'X' - error: unbound module ┌─ tests/more-v1/expansion/use_nested_self_as_invalid.move:12:9 │ 12 │ X::foo(); - │ ^ Unbound module alias 'X' + │ ^ Unbound module or type alias 'X' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/cross_module_valid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.exp similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/verification/verify/cross_module_valid.exp rename to third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.exp diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.move new file mode 100644 index 00000000000000..c6a2b28b585cf7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.move @@ -0,0 +1,54 @@ +module 0x8675309::M { + fun t0(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + *x_ref = 0; + }; + _ = x; + _ = move x; + } + + fun t1(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + } else { + *x_ref = 0; + }; + _ = x; + _ = move x; + } + + fun t2(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + *move x_ref = 0; + }; + _ = x; + _ = move x; + } + + fun t3(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + *move x_ref = 0; + } else { + _ = move x_ref; + }; + _ = x; + _ = move x; + } + + fun t4(cond: bool) { + let x = cond; + let x_ref = &x; + if (*x_ref) { + } else { + }; + _ = x; + _ = move x; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/single_module_valid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.exp similarity index 100% rename from third_party/move/move-compiler-v2/tests/more-v1/verification/verify/single_module_valid.exp rename to third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.exp diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.move new file mode 100644 index 00000000000000..54aed54badf7b8 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.move @@ -0,0 +1,26 @@ +module 0x8675309::M { + fun t0(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + *x_ref = 0; + } else { + _ = x_ref; + }; + _ = x; + _ = move x; + } + + fun t1(cond: bool) { + let x = 0; + let x_ref = &mut x; + if (cond) { + _ = x_ref; + } else { + *x_ref = 0; + }; + _ = x; + _ = move x; + } + +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both_invalid.exp index 1eefd0eb12cbf7..9c936fd87e3188 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both_invalid.exp @@ -7,7 +7,7 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow · 10 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 11 │ _ = move x; 12 │ *x_ref = 0; │ ---------- conflicting reference `x_ref` used here @@ -30,7 +30,7 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow · 23 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 24 │ _ = move x; 25 │ _ = *x_ref; │ ------ conflicting reference `x_ref` used here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_invalid.exp index 5cde78bddbc9bb..43c0b8c3b06d2e 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_invalid.exp @@ -7,7 +7,7 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow · 8 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 9 │ _ = move x; 10 │ *x_ref = 0; │ ---------- conflicting reference `x_ref` used here @@ -30,7 +30,7 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow · 20 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 21 │ _ = move x; 22 │ _ = *x_ref; │ ------ conflicting reference `x_ref` used here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.move new file mode 100644 index 00000000000000..f90eac37daeccf --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.move @@ -0,0 +1,43 @@ +module 0x8675309::M { + fun t0(cond: bool) { + let x = 0; + let x_ref = &mut x; + while (cond) { + _ = x_ref; + }; + _ = x; + _ = move x; + } + + fun t1() { + let x = 0; + let x_ref = &mut x; + loop { + _ = x_ref; + break + }; + _ = x; + _ = move x; + } + + fun t2(cond: bool) { + let x = 0; + let x_ref = &mut x; + loop { + if (cond) break else { _ = x_ref; } + }; + _ = x; + _ = move x; + } + + fun t4(cond: bool) { + let x = cond; + let x_ref = &x; + while (*x_ref) { + + }; + _ = x; + _ = move x; + } + +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop_invalid.exp index e009095cd86e44..4873d4aee63294 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_loop_invalid.exp @@ -7,9 +7,9 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow 5 │ while (cond) { 6 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 7 │ _ = x_ref; - │ --------- conflicting reference `x_ref` used here + │ - conflicting reference `x_ref` used here error: cannot copy local `x` which is still mutably borrowed ┌─ tests/more-v1/liveness/dead_refs_loop_invalid.move:16:12 @@ -18,9 +18,9 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow 14 │ loop { 15 │ _ = x_ref; - │ --------- conflicting reference `x_ref` used here + │ - conflicting reference `x_ref` used here 16 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here error: cannot copy local `x` which is still mutably borrowed ┌─ tests/more-v1/liveness/dead_refs_loop_invalid.move:25:13 @@ -29,6 +29,6 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow 23 │ loop { 24 │ if (cond) break else { _ = x_ref; }; - │ --------- conflicting reference `x_ref` used here + │ - conflicting reference `x_ref` used here 25 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.move new file mode 100644 index 00000000000000..ccb1d953fa8cf4 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.move @@ -0,0 +1,36 @@ +module 0x8675309::M { + fun t0(cond: bool) { + let x = 0; + let x_ref = &mut x; + while (cond) { + while (cond) { + _ = x_ref + } + }; + _ = x; + _ = move x; + } + + fun t1() { + let x = 0; + let x_ref = &mut x; + loop { + _ = x_ref; + loop { + _ = x_ref; + break + }; + break + }; + _ = x; + _ = move x; + } + + fun t2(cond: bool) { + let x = 0; + let x_ref = &mut x; + loop { + if (cond) { _ = x; break } else { while (!cond) { _ = x_ref } } + } + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested_invalid.exp index ae693feb90c65f..a65a2c22ccb438 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_nested_invalid.exp @@ -7,10 +7,10 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow · 7 │ _ = x_ref - │ --------- conflicting reference `x_ref` used here + │ - conflicting reference `x_ref` used here 8 │ }; 9 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here error: cannot copy local `x` which is still mutably borrowed ┌─ tests/more-v1/liveness/dead_refs_nested_invalid.move:19:16 @@ -19,10 +19,10 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow 16 │ loop { 17 │ _ = x_ref; - │ --------- conflicting reference `x_ref` used here + │ - conflicting reference `x_ref` used here 18 │ loop { 19 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here error: cannot copy local `x` which is still mutably borrowed ┌─ tests/more-v1/liveness/dead_refs_nested_invalid.move:29:67 @@ -31,6 +31,6 @@ error: cannot copy local `x` which is still mutably borrowed │ ------ previous mutable local borrow 28 │ loop { 29 │ if (cond) { _ = x_ref; break } else { while (!cond) { _ = x } } - │ --------- ^^^^^ copied here + │ - ^ copied here │ │ │ conflicting reference `x_ref` used here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.move new file mode 100644 index 00000000000000..7cc0a574935dc8 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + fun t() { + let x = 0; + let x_ref = &mut x; + *x_ref = 0; + _ = x; + _ = move x; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple_invalid.exp index 9b7512006af5a7..431fd7f818972e 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/dead_refs_simple_invalid.exp @@ -6,7 +6,7 @@ error: cannot copy local `x` which is still mutably borrowed 4 │ let x_ref = &mut x; │ ------ previous mutable local borrow 5 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 6 │ _ = move x; 7 │ *x_ref = 0; │ ---------- conflicting reference `x_ref` used here @@ -28,7 +28,7 @@ error: cannot copy local `x` which is still mutably borrowed 12 │ let x_ref = &mut x; │ ------ previous mutable local borrow 13 │ _ = x; - │ ^^^^^ copied here + │ ^ copied here 14 │ _ = move x; 15 │ _ = *x_ref; │ ------ conflicting reference `x_ref` used here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.move similarity index 58% rename from third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.move rename to third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.move index 6b0516e51f7f75..5682fc85520ddb 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.move +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.move @@ -1,45 +1,52 @@ module 0x8675309::M { fun t0() { let x = 0; + copy x; } fun t1() { let x = 0; - x = 0; + let x = copy x; + x; } fun t2(cond: bool) { if (cond) { let x = 0; + copy x; } } fun t3(cond: bool) { let x = 0; - x; + copy x; if (cond) { - x = 0; + copy x; } } fun t4(cond: bool) { let x = 0; if (cond) { - x = 1; + copy x; } else { - x = 2; + copy x; } } fun t5(cond: bool) { - let x; + let x = 0; while (cond) { - x = 0; - if (cond) { - x; - }; - x = 1; - } + copy x; + }; + } + + fun t6(cond: bool) { + let x = 0; + while (cond) { + copy x; + }; + copy x; } } diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/loop_weirdness.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/loop_weirdness.exp index 8c9b50d42d2314..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/loop_weirdness.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/loop_weirdness.exp @@ -1,13 +1,2 @@ -Diagnostics: -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/liveness/loop_weirdness.move:9:43 - │ -9 │ if (my_local >= 0) { break; }; - │ -----^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - - ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.move new file mode 100644 index 00000000000000..481e987c4cf8af --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi.move @@ -0,0 +1,58 @@ +script { + fun main() { + return; + } +} + +script { + fun main() { + abort 0; + } +} + +script { + fun main() { + { return }; + } +} + +script { + fun main() { + { abort 0 }; + } +} + + +script { + fun main(cond: bool) { + if (cond) { + return; + } else { + () + } + } +} + +script { + fun main(cond: bool) { + { + if (cond) { + return + } else { + abort 0 + }; + } + } +} + +script { + fun main(cond: bool) { + { + if (cond) { + abort 0; + } else { + return; + }; + } + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.exp new file mode 100644 index 00000000000000..adce287375efee --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.exp @@ -0,0 +1,18 @@ + +Diagnostics: +warning: Unused local variable `x`. Consider removing or prefixing with an underscore: `_x` + ┌─ tests/more-v1/liveness/trailing_semi_loops.move:27:17 + │ +27 │ let x: u64 = if (true) break else break; + │ ^ + + +Diagnostics: +warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x` + ┌─ tests/more-v1/liveness/trailing_semi_loops.move:76:17 + │ +76 │ x = 2; + │ ^^^^^ + + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.move b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.move new file mode 100644 index 00000000000000..6d324afb88248d --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.move @@ -0,0 +1,106 @@ +script { + fun main() { + loop (); + } +} + +script { + fun main() { + { (loop (): ()) }; + } +} + +script { + fun main() { + loop { + let x = 0; + 0 + x + 0; + }; + } +} + +script { + fun main() { + loop { + // TODO can probably improve this message, + // but its different than the normal trailing case + let x: u64 = if (true) break else break; + } + } +} + +script { + fun main() { + loop { + break; + } + } +} + +script { + fun main(cond: bool) { + loop { + if (cond) { + break; + } else { + () + } + } + } +} + +script { + fun main(cond: bool) { + loop { + if (cond) continue else break; + } + } +} + +script { + fun main(cond: bool) { + loop { + if (cond) abort 0 else return; + } + } +} + +script { + fun main(cond: bool) { + let x; + loop { + if (cond) { + x = 1; + break + } else { + x = 2; + continue + }; + }; + x; + } +} + +script { + fun main(cond: bool) { + loop { + if (cond) { + break; + } else { + continue; + }; + } + } +} + +script { + fun main(cond: bool) { + loop { + if (cond) { + return; + } else { + abort 0; + }; + } + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.exp b/third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.exp deleted file mode 100644 index 86118a9023a551..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/liveness/unused_assignment.exp +++ /dev/null @@ -1,16 +0,0 @@ - -Diagnostics: -warning: Unused local variable `x`. Consider removing or prefixing with an underscore: `_x` - ┌─ tests/more-v1/liveness/unused_assignment.move:3:13 - │ -3 │ let x = 0; - │ ^ - -warning: Unused local variable `x`. Consider removing or prefixing with an underscore: `_x` - ┌─ tests/more-v1/liveness/unused_assignment.move:13:17 - │ -13 │ let x = 0; - │ ^ - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.exp deleted file mode 100644 index 1c365f7f41bd76..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.exp +++ /dev/null @@ -1,33 +0,0 @@ - -Diagnostics: -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_partial_resource.move:6:21 - │ -6 │ if (cond) { r = R{}; }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_partial_resource.move:13:29 - │ -13 │ if (cond) {} else { r = R{}; }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_partial_resource.move:20:24 - │ -20 │ while (cond) { r = R{} }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: local `x` of type `T` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_partial_resource.move:31:21 - │ -31 │ if (cond) { x = y }; - │ ^^^^^ implicitly dropped here since it is no longer used - -error: local `y` of type `T` does not have the `copy` ability - ┌─ tests/more-v1/locals/assign_partial_resource.move:31:21 - │ -31 │ if (cond) { x = y }; - │ ^^^^^ copy needed here because value is still in use -32 │ (x, y) - │ - used here diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.move deleted file mode 100644 index 6b77947727f1e6..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_partial_resource.move +++ /dev/null @@ -1,34 +0,0 @@ -module 0x8675309::M { - struct R {} - - fun t1(cond: bool) { - let r: R; - if (cond) { r = R{}; }; - r = R{}; - R{} = r; - } - - fun t2(cond: bool) { - let r: R; - if (cond) {} else { r = R{}; }; - r = R{}; - R{} = r; - } - - fun t3(cond: bool) { - let r: R; - while (cond) { r = R{} }; - r = R{}; - R{} = r; - } - - fun t4() { - let r: R; - loop { r = R{} } - } - - fun t5(cond: bool, x: T, y: T): (T, T) { - if (cond) { x = y }; - (x, y) - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.exp deleted file mode 100644 index ab960094c3760e..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.exp +++ /dev/null @@ -1,25 +0,0 @@ - -Diagnostics: -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_resource.move:5:17 - │ -5 │ let r = R{}; - │ ^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_resource.move:12:19 - │ -12 │ if (cond) { r = R{}; }; - │ ^^^^^^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_resource.move:18:27 - │ -18 │ if (cond) {} else { r = R{}; }; - │ ^^^^^^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/assign_resource.move:24:24 - │ -24 │ while (cond) { r = R{} }; - │ ^^^^^^^ implicitly dropped here since it is no longer used diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.move deleted file mode 100644 index cd6ace6d633601..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/assign_resource.move +++ /dev/null @@ -1,37 +0,0 @@ -module 0x8675309::M { - struct R {} - - fun t0() { - let r = R{}; - r = R{}; - R{} = r; - } - - fun t1(cond: bool) { - let r = R{}; - if (cond) { r = R{}; }; - R{} = r; - } - - fun t2(cond: bool) { - let r = R{}; - if (cond) {} else { r = R{}; }; - R{} = r; - } - - fun t3(cond: bool) { - let r = R{}; - while (cond) { r = R{} }; - R{} = r; - } - - fun t4() { - let r = R{}; - loop { r = R{}; R {} = r } - } - - fun t5(x: T, y: T): T { - x = y; - x - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.exp deleted file mode 100644 index 6bd8d6d20529bf..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.exp +++ /dev/null @@ -1,81 +0,0 @@ - -Diagnostics: -warning: Unused local variable `z`. Consider removing or prefixing with an underscore: `_z` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:8:13 - │ -8 │ let z = y; - │ ^ - -warning: Unused local variable `q`. Consider removing or prefixing with an underscore: `_q` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:9:13 - │ -9 │ let q = x; - │ ^ - -warning: Unused local variable `z`. Consider removing or prefixing with an underscore: `_z` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:17:13 - │ -17 │ let z = y; - │ ^ - -warning: Unused local variable `q`. Consider removing or prefixing with an underscore: `_q` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:18:13 - │ -18 │ let q = x; - │ ^ - -warning: Unused local variable `z`. Consider removing or prefixing with an underscore: `_z` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:24:13 - │ -24 │ let z = y; - │ ^ - -warning: Unused local variable `q`. Consider removing or prefixing with an underscore: `_q` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:25:13 - │ -25 │ let q = x; - │ ^ - -warning: Unused local variable `z`. Consider removing or prefixing with an underscore: `_z` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:30:13 - │ -30 │ let z = y; - │ ^ - -warning: Unused local variable `q`. Consider removing or prefixing with an underscore: `_q` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:31:13 - │ -31 │ let q = x; - │ ^ - - -Diagnostics: -error: use of unassigned local `g` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:6:17 - │ -6 │ let r = R { f: 3, g }; - │ ^^^^^^^^^^^^^ - -error: use of unassigned local `y0` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:15:17 - │ -15 │ let r = R { f: x0, g: y0 }; - │ ^^^^^^^^^^^^^^^^^^ - -error: use of unassigned local `r` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:23:13 - │ -23 │ let R { f: x, g: y } = r; - │ ^^^^^^^^^^^^^^^^ - -error: use of unassigned local `y` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:30:17 - │ -30 │ let z = y; - │ ^ - -error: use of unassigned local `x` - ┌─ tests/more-v1/locals/struct_use_before_assign.move:31:17 - │ -31 │ let q = x; - │ ^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.move deleted file mode 100644 index 8d8997c73852d3..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/struct_use_before_assign.move +++ /dev/null @@ -1,33 +0,0 @@ -module 0x876543::M { - struct R { f: u64, g: u64 } - - fun main() { - let g: u64; - let r = R { f: 3, g }; - let R { f: x, g: y } = r; - let z = y; - let q = x; - } - - fun main2() { - let x0: u64 = 0; - let y0: u64; - let r = R { f: x0, g: y0 }; - let R { f: x, g: y } = r; - let z = y; - let q = x; - } - - fun main3() { - let r: R; - let R { f: x, g: y } = r; - let z = y; - let q = x; - } - - fun main4() { - let R { f: x, g: y }; - let z = y; - let q = x; - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.exp deleted file mode 100644 index 76b01669c3300e..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.exp +++ /dev/null @@ -1,22 +0,0 @@ - -Diagnostics: -warning: Unused parameter `i`. Consider removing or prefixing with an underscore: `_i` - ┌─ tests/more-v1/locals/unused_copyable.move:5:12 - │ -5 │ fun t0(i: u64, s: S) { - │ ^ - -warning: Unused parameter `s`. Consider removing or prefixing with an underscore: `_s` - ┌─ tests/more-v1/locals/unused_copyable.move:5:20 - │ -5 │ fun t0(i: u64, s: S) { - │ ^ - -warning: Unused local variable `s`. Consider removing or prefixing with an underscore: `_s` - ┌─ tests/more-v1/locals/unused_copyable.move:9:13 - │ -9 │ let s = S{}; - │ ^ - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.move deleted file mode 100644 index db26cb54321f7d..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_copyable.move +++ /dev/null @@ -1,16 +0,0 @@ -module 0x8675309::M { - struct S has drop {} - - // this produces unused parameter warnings for i and s, but not unused resource warnings - fun t0(i: u64, s: S) { - } - - fun t1() { - let s = S{}; - } - - fun t2() { - // prefixing an unused non-resource with _ suppresses the warning - let _s = S{}; - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.exp deleted file mode 100644 index 1c97fc9acc144d..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.exp +++ /dev/null @@ -1,59 +0,0 @@ - -Diagnostics: -warning: Unused local variable `r`. Consider removing or prefixing with an underscore: `_r` - ┌─ tests/more-v1/locals/unused_resource.move:5:13 - │ -5 │ let r = R{}; - │ ^ - -warning: Unused local variable `r`. Consider removing or prefixing with an underscore: `_r` - ┌─ tests/more-v1/locals/unused_resource.move:29:20 - │ -29 │ loop { let r = R{}; } - │ ^ - - -Diagnostics: -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:5:17 - │ -5 │ let r = R{}; - │ ^^^ implicitly dropped here since it is no longer used - -error: local `_r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:10:18 - │ -10 │ let _r = R{}; - │ ^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:15:21 - │ -15 │ if (cond) { r = R{}; }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:20:29 - │ -20 │ if (cond) {} else { r = R{}; }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:25:24 - │ -25 │ while (cond) { r = R{} }; - │ ^^^^^^^ implicitly dropped here since it is no longer used - -error: value of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:33:17 - │ -33 │ let _ = &R{}; - │ ^^^^ still borrowed but will be implicitly dropped later since it is no longer used - -error: local `_x` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource.move:36:22 - │ -36 │ fun t7(_x: R) { - │ ╭──────────────────────^ -37 │ │ } - │ ╰─────^ implicitly dropped here since it is no longer used diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.move deleted file mode 100644 index 4121a8c05ea11b..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource.move +++ /dev/null @@ -1,39 +0,0 @@ -module 0x8675309::M { - struct R {} - - fun t0() { - let r = R{}; - } - - fun t1() { - // prefixing an unused resource with _ does not work - let _r = R{}; - } - - fun t2(cond: bool) { - let r; - if (cond) { r = R{}; }; - } - - fun t3(cond: bool) { - let r; - if (cond) {} else { r = R{}; }; - } - - fun t4(cond: bool) { - let r; - while (cond) { r = R{} }; - } - - fun t5() { - loop { let r = R{}; } - } - - fun t6() { - let _ = &R{}; - } - - fun t7(_x: R) { - } - -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.exp b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.exp deleted file mode 100644 index b7fb7b833e2e53..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.exp +++ /dev/null @@ -1,63 +0,0 @@ - -Diagnostics: -warning: Unused local variable `r`. Consider removing or prefixing with an underscore: `_r` - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:5:13 - │ -5 │ let r = R{}; - │ ^ - -warning: Unused local variable `r`. Consider removing or prefixing with an underscore: `_r` - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:28:13 - │ -28 │ let r = R{}; - │ ^ - -warning: Unused local variable `x`. Consider removing or prefixing with an underscore: `_x` - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:33:13 - │ -33 │ let x = &R{}; - │ ^ - - -Diagnostics: -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:5:17 - │ -5 │ let r = R{}; - │ ^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:11:21 - │ -11 │ if (cond) { return () }; - │ ^^^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:17:29 - │ -17 │ if (cond) {} else { return () }; - │ ^^^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:23:24 - │ -23 │ while (cond) { return () }; - │ ^^^^^^^^^ implicitly dropped here since it is no longer used - -error: local `r` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:28:17 - │ -28 │ let r = R{}; - │ ^^^ implicitly dropped here since it is no longer used - -error: value of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:33:17 - │ -33 │ let x = &R{}; - │ ^^^^ implicitly dropped here since it is no longer used - -error: local `_x` of type `M::R` does not have the `drop` ability - ┌─ tests/more-v1/locals/unused_resource_explicit_return.move:38:9 - │ -38 │ return () - │ ^^^^^^^^^ implicitly dropped here since it is no longer used diff --git a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.move b/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.move deleted file mode 100644 index cb70af3240e97d..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/locals/unused_resource_explicit_return.move +++ /dev/null @@ -1,40 +0,0 @@ -module 0x8675309::M { - struct R {} - - fun t0() { - let r = R{}; - return () - } - - fun t1(cond: bool) { - let r = R {}; - if (cond) { return () }; - R {} = r; - } - - fun t2(cond: bool) { - let r = R{}; - if (cond) {} else { return () }; - R {} = r; - } - - fun t3(cond: bool) { - let r = R {}; - while (cond) { return () }; - R {} = r; - } - - fun t4() { - let r = R{}; - loop { return () } - } - - fun t5() { - let x = &R{}; - return () - } - - fun t6(_x: R) { - return () - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.move new file mode 100644 index 00000000000000..249619a650c26f --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_not_hex.move @@ -0,0 +1,3 @@ +address 1 { + +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.move new file mode 100644 index 00000000000000..e0d0903ab7eba0 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.move @@ -0,0 +1,3 @@ +address 340282366920938463463374607431768211456282366920938463463374607431768211456 { + +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.move new file mode 100644 index 00000000000000..b5eb37aa01a2fa --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/byte_string_success.move @@ -0,0 +1,20 @@ +module 0x8675309::M { + public fun byte_string(): vector { + b"Diem" + } + public fun byte_string_with_quotes(): vector { + b"\"Diem\"" + } + public fun byte_string_with_escaped_sequence(): vector { + b"Hello\n diem. \n Newline; \r Carriage return; \t Tab; \\ Backslash; \0 Null" + } + public fun empty_byte_string(): vector { + b"" + } + public fun byte_string_with_hex(): vector { + b"\x00\x01\x02" + } + public fun escaped_backslash_before_quote(): vector { + b"\\" + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.move new file mode 100644 index 00000000000000..314fbd306bbcd5 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/comments_ok.move @@ -0,0 +1,21 @@ +/// This is a test. +module 0x8675309::M { + /** + * One can have /* nested */ + * // block comments + */ + fun f() { } + + /* This is a nested /* regular comment // */ */ + fun g() {} + + // This is a line comment which contains unbalanced /* delimiter. + fun h() {} + + // Comments in strings are not comments at all. + fun str(): vector { + b"http://diem.com" + } + + // This is a regular comment which appears where a doc comment would not be allowed. +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.move new file mode 100644 index 00000000000000..34db1a5471a114 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/constant_values.move @@ -0,0 +1,20 @@ +module 0x8675309::M { + fun int8(): u8 { + 1u8 + } + fun int64(): u64 { + 2 + 3u64 + } + fun int128(): u128 { + 4u128 + } + fun int16(): u16 { + 123u16 + } + fun int32(): u32 { + 84 + 53u32 + } + fun int256(): u256 { + 4u256 + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_as_term.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_as_term.exp index 0b66f3801f5be6..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_as_term.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_as_term.exp @@ -1,13 +1,2 @@ -Diagnostics: -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/parser/control_exp_as_term.move:13:22 - │ -13 │ foo(&abort 0); - │ -------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - - ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.move new file mode 100644 index 00000000000000..c9f44701b396b2 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity.move @@ -0,0 +1,10 @@ +// tests that control structures are right associative when not immediately followed by a block + +module 0x42::M { + fun t(cond: bool) { + let _: u64 = 1 + if (cond) 0 else 10 + 10; + let _: bool = true || if (cond) false else 10 == 10; + let _: bool = if (cond) 10 else { 10 } == 10; + let _: u64 = if (cond) 0 else { 10 } + 1; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.move new file mode 100644 index 00000000000000..8581cea7fdd1bd --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.move @@ -0,0 +1,16 @@ +// tests that control structures are right associative when not immediately followed by a block + +// valid usage with field access + +module 0x42::M { + + struct S has copy, drop { f: u64 } + + fun t(cond: bool, s1: S, s2: S) { + let _: u64 = if (cond) 0 else s2.f; + let _: u64 = if (cond) s1.f else s2.f; + let _: u64 = if (cond) s1 else { s2 }.f; + let _: u64 = if (cond) { s1 } else { s2 }.f; + } + +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_typing_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_typing_invalid.exp index 6d2b0568e6fcfd..ad86e8fecd6fba 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_typing_invalid.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/control_exp_associativity_typing_invalid.exp @@ -29,12 +29,3 @@ error: expected expression with no value but found `u64` │ 26 │ loop bar() + 2; │ ^^^^^^^^^ - -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/parser/control_exp_associativity_typing_invalid.move:26:23 - │ -26 │ loop bar() + 2; - │ --------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.move new file mode 100644 index 00000000000000..d8b4056394a429 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/decimal_address.move @@ -0,0 +1,16 @@ +// Addresses can be decimal numbers +address 123 { +module M { + struct S {} + public fun nop() {} + public fun bar(): S { S{} } +} +} +module 123::N { + use 123::M; + use 123::M::S; + fun foo(): 123::M::S { + M::nop(); + (123::M::bar(): S) + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.move new file mode 100644 index 00000000000000..238961cacd2fda --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/empty_file.move @@ -0,0 +1 @@ +// The grammar allows a module file to be empty. diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.move new file mode 100644 index 00000000000000..c2c9505e937bae --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_function.move @@ -0,0 +1,10 @@ +module 0x8675309::M { + public entry fun f0() {} + entry public fun f1() {} + entry fun f2() {} + native entry fun f3(); + entry native fun f4(); + entry native public fun f5(); + native entry public fun f6(); + native public entry fun f7(); +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_struct.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_struct.exp index 31da8b71527e4a..8a890796cd466d 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_struct.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/entry_struct.exp @@ -4,4 +4,4 @@ error: invalid modifier ┌─ tests/more-v1/parser/entry_struct.move:3:5 │ 3 │ entry struct S {} - │ ^^^^^ Invalid constant declaration. 'entry' is used only on functions + │ ^^^^^ Invalid type declaration. 'entry' is used only on functions diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.move new file mode 100644 index 00000000000000..9fb277bb192eda --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_abort_braces.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + fun f(v: u64) { + // Braces or parenthesis are not required for a control expression + // inside an "abort" expression. + abort if (v == 0) 10 else v + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.move new file mode 100644 index 00000000000000..d8fe6771090f0a --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_if_braces.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + fun f(cond: bool) { + // Braces or parenthesis are not required for a control expression + // inside an "if" expression. + if (cond) { if (cond) () }; + if (cond) ( if (cond) () ); + if (cond) if (cond) () + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.move new file mode 100644 index 00000000000000..07468763040a2b --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_loop_braces.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + fun f(v: u64) { + // Braces or parenthesis are not required for a control expression + // inside a "loop" expression. + loop { if (v < 10) break }; + loop ( if (v < 10) break ); + loop if (v < 10) break + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.move new file mode 100644 index 00000000000000..b7d98247ec4472 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_braces.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + fun f(v: u64): u64 { + // Braces or parenthesis are not required for a control expression + // inside a "return" expression. + return if (v > 10) 10 else v + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.move new file mode 100644 index 00000000000000..1b3e861d9fd404 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.move @@ -0,0 +1,6 @@ +module 0x8675309::M { + fun f(v: u64) { + // Check a return without the optional return value + if (v > 100) return + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.move new file mode 100644 index 00000000000000..2401f9aa19d84e --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_unary_ops.move @@ -0,0 +1,12 @@ +module 0x8675309::M { + fun f(v: u64) { + let x = *&mut *&v; // Test borrows and dereferences + x; + } + fun annotated(v: u64): u64 { + (v : u64) // Test an expression annotated with a type + } + fun cast(v: u64): u64 { + (v as u64) // Test a type cast + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.move new file mode 100644 index 00000000000000..33721b0ce6cbe9 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/expr_while_braces.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + fun f(v: u64) { + // Braces or parenthesis are not required for a control expression + // inside a "while" expression. + while (v < 10) { v = v + 1 }; + while (v < 10) ( v = v + 1 ); + while (v < 10) v = v + 1 + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.move new file mode 100644 index 00000000000000..6efd20a39941e8 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/friend_decl_valid.move @@ -0,0 +1,18 @@ +address 0x42 { +module A {} +module B {} +module C {} + +module M { + // friend with fully qualified module id + friend 0x42::A; + + // friend with imported name + use 0x42::B; + friend B; + + // friend with asliased name + use 0x42::C as AliasedC; + friend AliasedC; +} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.move new file mode 100644 index 00000000000000..6b0ff89cac7f3d --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + struct X has key {} + // Test a trailing comma in the acquires list. + fun f() acquires X, { + borrow_global_mut(@0x1); + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.move new file mode 100644 index 00000000000000..3b390715123ade --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_params_commas.move @@ -0,0 +1,3 @@ +module 0x8675309::M { + fun g(_q1: &mut u64, _q2: u64,) { } // Trailing commas are OK +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.move new file mode 100644 index 00000000000000..716bbd8a1f5dab --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_public_native.move @@ -0,0 +1,4 @@ +module 0x42::M { + // visibility can come before native. previously not allowed + public native fun f(); +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.move new file mode 100644 index 00000000000000..6000129d045232 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.move @@ -0,0 +1,4 @@ +module 0x8675309::M { + // Trailing commas are *not* allowed in multi-value types. + fun f(): (u64, u64,) { (1, 2) } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.move new file mode 100644 index 00000000000000..904eda44827848 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_return_type.move @@ -0,0 +1,12 @@ +module 0x8675309::M { + // Test a unit return value. + fun f1(): () { } + + // Test a single type return value. + fun f2(): u64 { 1 } + fun f3(): (u64) { 1 } + fun f4(p: &u64): &u64 { p } + + // Test multiple return values. + fun f5(): (u64, u64) { (1, 2) } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.move new file mode 100644 index 00000000000000..2d77127c627df7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_empty.move @@ -0,0 +1,4 @@ +module 0x8675309::M { + // Test an empty list of type parameters. + fun fn<>() { } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.move new file mode 100644 index 00000000000000..040264c1fb08c1 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_nested.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + struct R {} + struct B { f: T } + fun fn() { } + fun caller() { + fn>(); // make sure '>>' is not parsed as a shift operator + fn>(); // also test with trailing comma + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.move new file mode 100644 index 00000000000000..5246ac45ed57bf --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.move @@ -0,0 +1,6 @@ +module 0x8675309::M { + fun fn() { } // Test a trailing comma in the type parameters + fun caller() { + fn() + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.move new file mode 100644 index 00000000000000..175201bf6b1137 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/function_visibility_friend.move @@ -0,0 +1,5 @@ +module 0x8675309::M { + public(friend) fun f() {} + public (friend) fun g() {} + public ( friend ) fun h() {} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.move new file mode 100644 index 00000000000000..5b3352afd665fc --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/hexstring.move @@ -0,0 +1,5 @@ +module 0x8675309::M { + public fun hexstring(): vector { + x"abcd" + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.move new file mode 100644 index 00000000000000..033b7a98962012 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/lambda_no_param.move @@ -0,0 +1,17 @@ +module 0xdecafbad::m { + inline fun foo(f: ||) { + f(); + } + + public fun one() { + foo(|| {}); + } + + inline fun bar(f:||u64): u64 { + f() + } + + public fun two(x:u64): u64 { + bar(||x) + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.move new file mode 100644 index 00000000000000..0baf67239640cf --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding.move @@ -0,0 +1,36 @@ +module 0x8675309::M { + struct R has copy, drop { + f: u64 + } + struct Generic has copy, drop { + g: T + } + fun f() { + let () = (); + let (): () = (); + // Test with whitespace between parenthesis. + let ( ) = ( ); + let ( ): ( ) = ( ); + let v1 = 1; + let v2: u64 = 2; + let (v3) = 3; // for consistency, check a single variable inside parens + let (x1, x2) = (1, 2); + let (x3, x4): (u64, u64) = (3, 4); + v1; + v2; + v3; + x1; + x2; + x3; + x4; + } + fun g(r: R, g: Generic) { + let R { f } = copy r; + let (R { f: f1 }, R { f: f2 }) = (copy r, move r); + let Generic { g: R { f: f3 } } = g; + f; + f1; + f2; + f3; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_bad_name.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_bad_name.exp index 3ba7bb8f3059d5..3ae05269d2cb90 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_bad_name.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_bad_name.exp @@ -7,4 +7,4 @@ error: unexpected token │ ^ │ │ │ Unexpected '{' - │ Expected a variable or struct name + │ Expected a variable or struct or variant name diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_missing_fields.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_missing_fields.exp index fc196e8f6485ae..9b81b8c2ca188e 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_missing_fields.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_missing_fields.exp @@ -1,10 +1,7 @@ Diagnostics: -error: unexpected token - ┌─ tests/more-v1/parser/let_binding_missing_fields.move:6:26 +error: invalid 'module' declaration + ┌─ tests/more-v1/parser/let_binding_missing_fields.move:1:8 │ -6 │ let Generic = g; // Test a type name with no field bindings - │ ^ - │ │ - │ Unexpected '=' - │ Expected '{' +1 │ module M { + │ ^ Invalid module declaration. The module does not have a specified address. Either declare it inside of an 'address
{' block or declare it with an address 'module
::M'' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.move new file mode 100644 index 00000000000000..b8e325a43dee34 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + fun f() { + let (x1, x2,) = (1, 2); // Test a trailing comma in the let binding + x1; + x2; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.move new file mode 100644 index 00000000000000..6c4eb3cce7fb5f --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_struct_after_func.move @@ -0,0 +1,5 @@ +module 0x8675309::M { + fun fn() {} + // Struct declarations can be intermixed with function declarations. + struct S {} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.move new file mode 100644 index 00000000000000..b7568f652fd373 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_func.move @@ -0,0 +1,13 @@ +address 0x2 { +module X { + public fun foo() {} +} + +module M { + fun f() {} + // Use declarations can come after function declarations. + use 0x2::X; + + fun g() { X::foo() } +} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.move new file mode 100644 index 00000000000000..11ff54af98b88e --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/module_use_after_struct.move @@ -0,0 +1,13 @@ +address 0x2 { +module X { + public fun foo() {} +} + +module M { + struct S {} + // Use declarations can come after struct declarations. + use 0x2::X; + + fun g() { X::foo() } +} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.move new file mode 100644 index 00000000000000..98e1f96fd6bf5c --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address.move @@ -0,0 +1,18 @@ +// All valid positions of named addresses +address M {} + +module M::Mod { + + struct S {} + + friend M::M; + public(friend) fun foo() {} +} + +module M::M { + use M::Mod::foo; + + struct X { s: M::Mod::S } + + fun bar() { foo() } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.move new file mode 100644 index 00000000000000..3583aca818c15f --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/named_address_value.move @@ -0,0 +1,5 @@ +script { + fun main() { + (@M: address); + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.move new file mode 100644 index 00000000000000..314fbd306bbcd5 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/newline_crlf.move @@ -0,0 +1,21 @@ +/// This is a test. +module 0x8675309::M { + /** + * One can have /* nested */ + * // block comments + */ + fun f() { } + + /* This is a nested /* regular comment // */ */ + fun g() {} + + // This is a line comment which contains unbalanced /* delimiter. + fun h() {} + + // Comments in strings are not comments at all. + fun str(): vector { + b"http://diem.com" + } + + // This is a regular comment which appears where a doc comment would not be allowed. +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.move new file mode 100644 index 00000000000000..30876031ab80aa --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/not_doc_comment.move @@ -0,0 +1,5 @@ +module 0xdecafbad::m { + /**/ + fun /**/foo() { } + /* /**/ */ +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.move new file mode 100644 index 00000000000000..12173339df90d8 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/num_literal_underscore.move @@ -0,0 +1,43 @@ +module 0x42::M { + fun t() { + // Single underscore separations allowed + let _ = 8_5u128; + let _ = 8_5; + let _: u8 = 8_5; + let _ = 0x8_5u128; + let _ = 0x8_5; + let _: u8 = 0x8_5; + + // Multiple underscore separations allowed + let _ = 02345677_15463636363_36464784848_456847568568775u256; + let _ = 0_1_3_4; + let _: u64 = 0_1_3_4; + let _ = 0x02345677_15463636363_36464784848_456847568568775u256; + let _ = 0x0_1_3_4; + let _: u64 = 0x0_1_3_4; + + // Single trailing allowed + let _ = 567_u64; + let _ = 567_; + let _: u64 = 5_6_7; + let _ = 0x567_u64; + let _ = 0x567_; + let _: u64 = 0x5_6_7; + + // Multiple trailing allowed + let _ = 567___u32; + let _ = 567___; + let _: u64 = 567___; + let _ = 0x567___u32; + let _ = 0x567___; + let _: u64 = 0x567___; + + // Multiple underscore in tandem allowed + let _ = 0__8u16; + let _ = 0__8; + let _: u8 = 0__8; + let _ = 0x0__8u16; + let _ = 0x0__8; + let _: u8 = 0x0__8; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/return_in_binop.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/return_in_binop.exp index de40acef151a22..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/return_in_binop.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/return_in_binop.exp @@ -1,13 +1,2 @@ -Diagnostics: -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/parser/return_in_binop.move:18:19 - │ -18 │ return ^ 0; - │ ----------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - - ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.exp new file mode 100644 index 00000000000000..729c903a835a02 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.exp @@ -0,0 +1,235 @@ + +Diagnostics: +error: type cannot have type arguments + ┌─ tests/more-v1/parser/spec_parsing_ok.move:15:30 + │ +15 │ native fun all(x: SomeCollection, predicate: |T|bool): bool; + │ ^^^^^^^^^^^^^^ + +error: undeclared `0x8675309::M::SomeCollection` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:15:30 + │ +15 │ native fun all(x: SomeCollection, predicate: |T|bool): bool; + │ ^^^^^^^^^^^^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:48:17 + │ +48 │ ensures RET == x + 1; + │ ^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:57:17 + │ +57 │ ensures RET == x/y; + │ ^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:58:24 + │ +58 │ ensures x/y == RET; + │ ^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:69:17 + │ +69 │ ensures RET = {let y = x; y + 1}; + │ ^^^ + +error: expected `bool` but found a value of type `()` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:69:17 + │ +69 │ ensures RET = {let y = x; y + 1}; + │ ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: expression construct not supported in specifications + ┌─ tests/more-v1/parser/spec_parsing_ok.move:69:17 + │ +69 │ ensures RET = {let y = x; y + 1}; + │ ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: cannot pass `|(num, num)|num` to a function which expects argument of type `|(num, num)|bool` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:77:24 + │ +77 │ ensures all(x, |y, z| x + y + z); + │ ^^^^^^^^^^^^^^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:17 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^^^ + +error: expected `vector<_>` but found a value of type `u64` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:23 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^ + +error: expected `vector<_>` but found a value of type `u64` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:31 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^ + +error: cannot use `vector<_>` with an operator which expects a value of type `bool` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:31 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^^^^^^^ + +error: expected `bool` but found a value of type `()` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:17 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^^^^^^^^^^^^^^^^^^^^^ + +error: expression construct not supported in specifications + ┌─ tests/more-v1/parser/spec_parsing_ok.move:84:17 + │ +84 │ ensures RET = x[1] && x[0..3]; + │ ^^^^^^^^^^^^^^^^^^^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:91:27 + │ +91 │ ensures x > 0 ==> RET == x - 1; + │ ^^^ + +error: undeclared `RET` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:92:28 + │ +92 │ ensures x == 0 ==> RET == x; + │ ^^^ + +error: undeclared `generic` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:112:26 + │ +112 │ invariant update generic = 23; + │ ^^^^^^^^^^^^ + +error: expected `bool` but found a value of type `()` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:112:26 + │ +112 │ invariant update generic = 23; + │ ^^^^^^^^^^^^^^^^^ + +error: expression construct not supported in specifications + ┌─ tests/more-v1/parser/spec_parsing_ok.move:112:26 + │ +112 │ invariant update generic = 23; + │ ^^^^^^^^^^^^^^^^^ + +error: undeclared struct `M::generic` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:113:26 + │ +113 │ invariant update Self::generic = 24; + │ ^^^^^^^^^^^^^ + +error: expected `bool` but found a value of type `()` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:113:26 + │ +113 │ invariant update Self::generic = 24; + │ ^^^^^^^^^^^^^^^^^^^^^^^ + +error: expression construct not supported in specifications + ┌─ tests/more-v1/parser/spec_parsing_ok.move:113:26 + │ +113 │ invariant update Self::generic = 24; + │ ^^^^^^^^^^^^^^^^^^^^^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:124:28 + │ +124 │ requires global(0x0).f == global(0x1).f; + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:124:48 + │ +124 │ requires global(0x0).f == global(0x1).f; + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:125:27 + │ +125 │ ensures global(0x0).f == global(0x1).f; + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:125:47 + │ +125 │ ensures global(0x0).f == global(0x1).f; + │ ^^^ + +error: `foo` not declared in schema + ┌─ tests/more-v1/parser/spec_parsing_ok.move:129:39 + │ +129 │ include ModuleInvariant{foo:bar, x:y}; + │ ^^^ + +error: undeclared `bar` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:129:43 + │ +129 │ include ModuleInvariant{foo:bar, x:y}; + │ ^^^ + +error: `x` not declared in schema + ┌─ tests/more-v1/parser/spec_parsing_ok.move:129:48 + │ +129 │ include ModuleInvariant{foo:bar, x:y}; + │ ^ + +error: undeclared `y` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:129:50 + │ +129 │ include ModuleInvariant{foo:bar, x:y}; + │ ^ + +error: property `do_not_verify` is not valid in this context + ┌─ tests/more-v1/parser/spec_parsing_ok.move:135:9 + │ +135 │ pragma do_not_verify, timeout = 60; + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: property `timeout` is not valid in this context + ┌─ tests/more-v1/parser/spec_parsing_ok.move:135:9 + │ +135 │ pragma do_not_verify, timeout = 60; + │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:142:37 + │ +142 │ invariant exists(0x0) <==> exists(0x0); + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:142:57 + │ +142 │ invariant exists(0x0) <==> exists(0x0); + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:143:45 + │ +143 │ invariant exists(0x0) && exists(0x1) <==> exists(0x1) && exists(0x0); + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:143:63 + │ +143 │ invariant exists(0x0) && exists(0x1) <==> exists(0x1) && exists(0x0); + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:143:83 + │ +143 │ invariant exists(0x0) && exists(0x1) <==> exists(0x1) && exists(0x0); + │ ^^^ + +error: cannot use `u256` with an operator which expects a value of type `address` + ┌─ tests/more-v1/parser/spec_parsing_ok.move:143:101 + │ +143 │ invariant exists(0x0) && exists(0x1) <==> exists(0x1) && exists(0x0); + │ ^^^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.move new file mode 100644 index 00000000000000..da4138cdf86034 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.move @@ -0,0 +1,153 @@ +// These are some basic parsing tests for specifications which are expected to succeed. +// Full testing of spec parsing correctness is done outside of this crate. +// +// Note that even though we only test parsing, we still need to ensure that the move code (not the specification) +// is type checking correctly, because with no parsing error, the test harness +// will run subsequent phases of the move-compiler compiler. +// +// For parse failures, see the `spec_*_fail.move` test cases. + +module 0x8675309::M { + spec module { + global expected_coin_sum: u64; + global other: bool; + + native fun all(x: SomeCollection, predicate: |T|bool): bool; + + fun spec_fun_using_spec_constructs(x: u64, y: u64) : u64 { + // This function would crash in phases after expansion if we would pass it on as a regular function. Testing + // here that we don't pass it on. + let _ = |z| z + 1; + let _ = x .. y; + x + } + } + + struct T has key {x: u64} + struct R has key {x: u64} + + struct SomeCoin { + x : u64, + y: u64, + } + + spec SomeCoin { + // Data invariants + invariant x > 0; + invariant x == y; + } + + spec with_aborts_if { + aborts_if x == 0; + } + fun with_aborts_if(x: u64): u64 { + x + } + + spec with_ensures { + ensures RET == x + 1; + } + fun with_ensures(x: u64): u64 { + x + 1 + } + + spec with_multiple_conditions_and_acquires { + aborts_if y == 0; + aborts_if 0 == y; + ensures RET == x/y; + ensures x/y == RET; + } + + fun with_multiple_conditions_and_acquires(addr: address, x: u64, y: u64): u64 + acquires T, R { + let _ = borrow_global_mut(addr); + let _ = borrow_global_mut(addr); + x / y + } + + spec using_block { + ensures RET = {let y = x; y + 1}; + } + fun using_block(x: u64): u64 { + x + 1 + } + + spec using_lambda + { + ensures all(x, |y, z| x + y + z); + } + fun using_lambda(x: u64): u64 { + x + } + + spec using_index_and_range { + ensures RET = x[1] && x[0..3]; + } + fun using_index_and_range(x: u64): u64 { + x + } + + spec using_implies { + ensures x > 0 ==> RET == x - 1; + ensures x == 0 ==> RET == x; + } + fun using_implies(x: u64): u64 { + x + } + + spec with_emits { + emits _msg to _guid; + emits _msg to _guid if true; + emits _msg to _guid if x > 7; + } + fun with_emits(_guid: vector, _msg: T, x: u64): u64 { + x + } + + spec module { + global x: u64; + local y: u64; + z: u64; + global generic: u64; + invariant update generic = 23; + invariant update Self::generic = 24; + } + + fun some_generic() { + } + spec some_generic { + ensures generic == 1; + ensures Self::generic == 1; + } + + spec schema ModuleInvariant { + requires global(0x0).f == global(0x1).f; + ensures global(0x0).f == global(0x1).f; + } + + spec some_generic { + include ModuleInvariant{foo:bar, x:y}; + } + + spec module { + apply ModuleInvariant to *foo*; + apply ModuleInvariant to *foo*, bar except public *, internal baz; + pragma do_not_verify, timeout = 60; + } + + spec module { + invariant forall x: num, y: num, z: num : x == y && y == z ==> x == z; + invariant forall x: num : exists y: num : y >= x; + invariant exists x in 1..10, y in 8..12 : x == y; + invariant exists(0x0) <==> exists(0x0); + invariant exists(0x0) && exists(0x1) <==> exists(0x1) && exists(0x0); + } + + spec module { + fun spec_fun_non_zero(): num; + axiom spec_fun_non_zero() > 0; + + fun spec_fun_identity(x: T): T; + axiom forall x: T: spec_fun_identity(x) == x; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_public.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_public.exp index 5b9b5be02896b9..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_public.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_public.exp @@ -1,7 +1,2 @@ -Diagnostics: -error: invalid modifier - ┌─ tests/more-v1/parser/struct_public.move:3:5 - │ -3 │ public struct Foo {} - │ ^^^^^^ Invalid struct declaration. Structs cannot have visibility modifiers as they are always 'public' +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.move new file mode 100644 index 00000000000000..0fbed4ccb45736 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.move @@ -0,0 +1,3 @@ +module 0x8675309::M { + struct S { f: u64, g: u64, } // Test a trailing comma after the last field +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.move new file mode 100644 index 00000000000000..4915e40df1d818 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_empty.move @@ -0,0 +1,4 @@ +module 0x8675309::M { + // Test an empty list of type parameters. + struct S<> { } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.move new file mode 100644 index 00000000000000..57595ffba5fd3c --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.move @@ -0,0 +1,3 @@ +module 0x8675309::M { + struct S { f1: T1, f2: T2 } // Test a trailing comma in the type parameters +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.exp b/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.move b/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.move new file mode 100644 index 00000000000000..285da306d713d5 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/parser/use_module_member.move @@ -0,0 +1,37 @@ +address 0x1 { + +module X { + struct S {} + public fun foo() {} +} + +module Y { + struct S {} + public fun foo() {} +} + +module Z { + struct S {} + public fun foo() {} +} + +module M { + + struct A { f1: XS, f2: S, f3: Z} + + use 0x1::X::{S as XS, foo}; + use 0x1::Z::{ + S as Z, + foo as zfoo, + }; + + public fun m() { + foo(); + Foo(); + zfoo(); + } + + use 0x1::Y::S; + use 0x1::Y::foo as Foo; +} +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_bad.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_bad.move new file mode 100644 index 00000000000000..0ce38d3e727f75 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_bad.move @@ -0,0 +1,42 @@ +module 0x8675309::Tester { + fun eqtest1() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = copy r == copy r; + } + + fun eqtest2() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = copy r == move r; + } + + fun neqtest1() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = copy r != copy r; + } + + fun neqtest2() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = copy r != move r; + } +} + +// check: READREF_EXISTS_MUTABLE_BORROW_ERROR +// check: READREF_EXISTS_MUTABLE_BORROW_ERROR +// check: READREF_EXISTS_MUTABLE_BORROW_ERROR +// check: READREF_EXISTS_MUTABLE_BORROW_ERROR diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_ok.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_ok.move new file mode 100644 index 00000000000000..5ee78d10b90b0d --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/eq_ok.move @@ -0,0 +1,37 @@ +module 0x8675309::Tester { + fun eqtest1() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = freeze(copy r) == freeze(copy r); + } + + fun eqtest2() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = freeze(copy r) == freeze(move r); + } + + fun neqtest1() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = freeze(copy r) != freeze(copy r); + } + + fun neqtest2() { + let x: u64; + let r: &mut u64; + + x = 0; + r = &mut x; + _ = freeze(copy r) != freeze(move r); + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/factor_valid_2.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/factor_valid_2.move new file mode 100644 index 00000000000000..16192f63035574 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/factor_valid_2.move @@ -0,0 +1,45 @@ +module 0x8675309::M { + struct S { g: u64 } + + fun t1(root: &mut S, cond: bool) { + let x1 = 0; + let eps = if (cond) bar(root) else &x1; + let g = &root.g; + eps; + g; + eps; + } + + fun t2() { + let x1 = 0; + let x2 = 1; + let eps = foo(&x1, &x2); + baz(&x1, eps); + } + + fun t3() { + let x1 = 0; + let x2 = 1; + let eps = foo(&x1, &x2); + baz(freeze(&mut x1), eps); + } + + fun foo(a: &u64, b: &u64): &u64 { + let ret; + if (*a > *b) { + ret = move a; + move b; + } else { + ret = move b; + move a; + }; + ret + } + + fun bar(a: &mut S): &u64 { + &a.g + } + + fun baz(_a: &u64, _b: &u64) { + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/imm_borrow_loc_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/imm_borrow_loc_valid.move new file mode 100644 index 00000000000000..d6ff5c07d9585c --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/imm_borrow_loc_valid.move @@ -0,0 +1,38 @@ +module 0x8675309::Tester { + use std::signer; + + struct Data has key { v1: u64, v2: u64 } + struct Box has key { f: u64 } + + // the resource struct is here to just give a feeling why the computation might not be reorderable + fun bump_and_pick(account: &signer, b1: &mut Box, b2: &mut Box): &u64 acquires Data { + let sender = signer::address_of(account); + let data = borrow_global_mut(sender); + b1.f = data.v1; + b2.f = data.v2; + if (b1.f > b2.f) &b1.f else &b2.f + } + + fun larger_field(account: &signer, drop: address, result: &mut u64) acquires Box, Data { + let sender = signer::address_of(account); + let b1 = move_from(sender); + let b2 = move_from(drop); + + assert!(b1.f == 0, 42); + assert!(b2.f == 0, 42); + + let returned_ref = bump_and_pick(account, &mut b1, &mut b2); + + // imagine some more interesting check than these asserts + assert!(b1.f != 0, 42); + assert!(b2.f != 0, 42); + assert!( + (returned_ref == &(&mut b1).f) != (returned_ref == &(&mut b2).f), + 42 + ); + + *result = *returned_ref; + move_to(account, b1); + Box { f: _ } = b2; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/mutable_borrow_local_twice_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/mutable_borrow_local_twice_invalid.exp deleted file mode 100644 index 7f45ed9263db16..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/mutable_borrow_local_twice_invalid.exp +++ /dev/null @@ -1,9 +0,0 @@ - -============ bytecode verification failed ======== - -Diagnostics: -bug: bytecode verification failed with unexpected status code `WRITEREF_EXISTS_BORROW_ERROR`. This is a compiler bug, consider reporting it. - ┌─ tests/more-v1/translated_ir_tests/move/borrow_tests/mutable_borrow_local_twice_invalid.move:6:9 - │ -6 │ *r2 = 2; - │ ^^^^^^^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/writeref_borrow_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/writeref_borrow_invalid.exp deleted file mode 100644 index 9f784aeb790aeb..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/writeref_borrow_invalid.exp +++ /dev/null @@ -1,9 +0,0 @@ - -============ bytecode verification failed ======== - -Diagnostics: -bug: bytecode verification failed with unexpected status code `WRITEREF_EXISTS_BORROW_ERROR`. This is a compiler bug, consider reporting it. - ┌─ tests/more-v1/translated_ir_tests/move/borrow_tests/writeref_borrow_invalid.move:10:9 - │ -10 │ *g_mut = G { v: 0 }; - │ ^^^^^^^^^^^^^^^^^^^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.move new file mode 100644 index 00000000000000..3abe2fb0a46582 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.move @@ -0,0 +1,18 @@ +module 0x8675309::M { + struct R has key { data: vector } + + fun is_ok_(_addr: &address, _data: &vector): bool { + true + } + + public fun is_ok(addr: address): bool acquires R { + is_ok_(&addr, &borrow_global(@0x1D8).data) + } + + // ImmBorrowLoc(0), + // LdConst(1), + // ImmBorrowGlobal(StructDefinitionIndex(4)), + // ImmBorrowField(FieldHandleIndex(0)), + // Call(45), + // Ret, +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.exp index 90b32906711cc7..d31eb5b7e945a4 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.exp @@ -1,2 +1,10 @@ +Diagnostics: +warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x` + ┌─ tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.move:5:3 + │ +5 │ x = 7 + │ ^^^^^ + + ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.exp index 90b32906711cc7..f8df53a4e418cb 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.exp @@ -1,2 +1,10 @@ +Diagnostics: +warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x` + ┌─ tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.move:5:3 + │ +5 │ x = 7; + │ ^^^^^ + + ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.exp deleted file mode 100644 index 2f941a81f05f12..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.exp +++ /dev/null @@ -1,13 +0,0 @@ - -Diagnostics: -error: invalid assignment - ┌─ tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.move:14:19 - │ -14 │ (_, _, _, s.f) = four(); - │ ^^^ Invalid assignment syntax. Expected: a local, a field write, or a deconstructing assignment - -error: invalid assignment - ┌─ tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.move:15:19 - │ -15 │ (_, _, _, *r_ref) = four(); - │ ^^^^^^ Invalid assignment syntax. Expected: a local, a field write, or a deconstructing assignment diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.move deleted file mode 100644 index 2858e5b6d2a343..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/mixed_lvalue.move +++ /dev/null @@ -1,17 +0,0 @@ -module 0x8675309::A { - - struct S has drop { f: u64 } - - fun four(): (u64, u64, u64, u64) { - (0, 1, 2, 3) - } - - public fun mixed() { - let r = 0; - let r_ref = &mut r; - let s = S { f: 0 }; - - (_, _, _, s.f) = four(); - (_, _, _, *r_ref) = four(); - } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.move new file mode 100644 index 00000000000000..2466020082e505 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.move @@ -0,0 +1,16 @@ +// script functions no longer have any built in checks outside of visibility rules + +script { + fun t0(_s: signer, _s2: signer) { + } +} + +script { + fun t1(_s: signer, _s2: signer, _u: u64) { + } +} + +script { + fun t2(_s: signer, _u: u64, _s2: signer) { + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.move new file mode 100644 index 00000000000000..c1828d57fadba6 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.move @@ -0,0 +1,5 @@ +module 0x8675309::M { + fun foo(signer: address) { + signer; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.move new file mode 100644 index 00000000000000..f1080132339a66 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.move @@ -0,0 +1,11 @@ +// script functions no longer have any built in checks outside of visibility rules + +script { + fun t0(_u: u64, _s: signer) { + } +} + +script { + fun t1(_u: u64, _s: signer, _u2: u64) { + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.move new file mode 100644 index 00000000000000..9de81010c8fdfd --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.move @@ -0,0 +1,15 @@ +module 0x8675309::M { + struct R has key { f: bool } + fun t0(s: &mut signer) { + // implicit freeze + move_to(s, R { f: false }) + } +} + +module 0x8675309::N { + struct R has key { f: T } + fun t0(s: &mut signer) { + // implicit freeze + () = move_to(s, R { f: false }) + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.move new file mode 100644 index 00000000000000..48e8a53f231fba --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + // TODO(tmn) update when abilities hit + // resource struct R { s: signer } + // fun t(s1: &signer, s: signer) { + // move_to(s1, R { s }) + // } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.move new file mode 100644 index 00000000000000..a276be6a019666 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.move @@ -0,0 +1,15 @@ +module 0x8675309::M { + struct R has key { f: bool } + fun t0(s: &signer, r: R) { + move_to(s, r); + move_to(s, R { f: false }) + } +} + +module 0x8675309::N { + struct R has key { f: T } + fun t0(s: &signer, r: R) { + move_to(s, r); + move_to(s, R { f: false }) + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.move new file mode 100644 index 00000000000000..234662e456cb0a --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.move @@ -0,0 +1,6 @@ +module 0x8675309::M { + fun t(s1: signer, s2: signer): signer { + s1 = s2; + s1 + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.move new file mode 100644 index 00000000000000..e7ac90ac092cd0 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.move @@ -0,0 +1,13 @@ +module 0x8675309::M { + fun consume(s: signer) { + consume(move s) + } + + fun t(cond: bool, s1: signer, s2: signer) { + if (cond) consume(s1); + s1 = s2; + consume(s1); + } +} + +// check: STLOC_UNSAFE_TO_DESTROY_ERROR diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.move new file mode 100644 index 00000000000000..2fe351b162b079 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + struct S has drop { + f: T, + } + + fun t(s: signer) { + let _ = S { f: s }; + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.move new file mode 100644 index 00000000000000..6acb1df050cb21 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.move @@ -0,0 +1,26 @@ +// script functions no longer have any built in checks outside of visibility rules + +script { + fun t0(_s: signer, _s2: signer, _s3: signer) { + } +} + +script { + fun t1(_s: signer, _s2: signer, _s3: signer, _u: u64) { + } +} + +script { + fun t1(_s: signer, _s2: signer, _u: u64, _s3: signer) { + } +} + +script { + fun t2(_u: u64, _s2: signer) { + } +} + +script { + fun t2(_s: signer, _u: u64, _s2: signer) { + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.move new file mode 100644 index 00000000000000..4081de578c31f5 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.move @@ -0,0 +1,4 @@ +module 0x8675309::M { + fun t(_s: signer) { + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.move new file mode 100644 index 00000000000000..a1faf3252c6090 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.move @@ -0,0 +1,9 @@ +module 0x8675309::M { + fun consume(s: signer) { + consume(move s) + } + + fun t(cond: bool, s: signer) { + if (cond) consume(s) + } +} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.exp b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.exp new file mode 100644 index 00000000000000..90b32906711cc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.exp @@ -0,0 +1,2 @@ + +============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.move b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.move new file mode 100644 index 00000000000000..4851c60a46adc7 --- /dev/null +++ b/third_party/move/move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.move @@ -0,0 +1,7 @@ +module 0x8675309::M { + fun t(sref: &mut signer, s: signer) { + *sref = s; + } +} + +// check: WRITEREF_RESOURCE_ERROR diff --git a/third_party/move/move-compiler-v2/tests/more-v1/typing/abort_any_type.exp b/third_party/move/move-compiler-v2/tests/more-v1/typing/abort_any_type.exp index 774caa6aa4cbc3..90b32906711cc7 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/typing/abort_any_type.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/typing/abort_any_type.exp @@ -1,22 +1,2 @@ -Diagnostics: -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/abort_any_type.move:5:22 - │ -5 │ 0 + (abort 0); - │ -------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/abort_any_type.move:9:21 - │ -9 │ foo(abort 0); - │ ------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - - ============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/typing/borrow_divergent.exp b/third_party/move/move-compiler-v2/tests/more-v1/typing/borrow_divergent.exp index f55067dfd50c49..71fb1791e58eef 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/typing/borrow_divergent.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/typing/borrow_divergent.exp @@ -6,41 +6,14 @@ error: unable to infer instantiation of type `_` (consider providing type argume 4 │ &break; │ ^^^^^ -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/borrow_divergent.move:4:18 - │ -4 │ &break; - │ ------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - error: unable to infer instantiation of type `_` (consider providing type arguments or annotating the type) ┌─ tests/more-v1/typing/borrow_divergent.move:11:12 │ 11 │ &{ return }; │ ^^^^^^ -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/borrow_divergent.move:11:20 - │ -11 │ &{ return }; - │ -----------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached - error: unable to infer instantiation of type `_` (consider providing type arguments or annotating the type) ┌─ tests/more-v1/typing/borrow_divergent.move:18:21 │ 18 │ &(if (cond) return else return); │ ^^^^^^ - -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/borrow_divergent.move:18:40 - │ -18 │ &(if (cond) return else return); - │ -------------------------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached diff --git a/third_party/move/move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_annotation.exp b/third_party/move/move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_annotation.exp index f36f7366f37daf..8eece9cdbae8c3 100644 --- a/third_party/move/move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_annotation.exp +++ b/third_party/move/move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_annotation.exp @@ -10,12 +10,3 @@ error: type `R` is missing required ability `copy` │ ^ │ = required by instantiating type parameter `T:copy` of struct `CupC` - -warning: Unnecessary trailing semicolon - ┌─ tests/more-v1/typing/constraints_not_satisfied_type_annotation.move:7:35 - │ -7 │ ignore((abort 0: CupC)); - │ --------------------------^ - │ │ │ - │ │ A trailing `;` in an expression block implicitly adds a `()` value expression after the semicolon, not needed here. - │ Any code after this expression will not be reached diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/cross_module_valid.verification b/third_party/move/move-compiler-v2/tests/more-v1/verification/cross_module_valid.verification deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/double_annotation.verification b/third_party/move/move-compiler-v2/tests/more-v1/verification/double_annotation.verification deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.exp deleted file mode 100644 index b7e7d23306aa8d..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.exp +++ /dev/null @@ -1,7 +0,0 @@ - -Diagnostics: -error: unbound module - ┌─ tests/more-v1/verification/noverify/cross_module_invalid.move:23:9 - │ -23 │ A::build_foo() - │ ^ Unbound module alias 'A' diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.move deleted file mode 100644 index 9d78d065a3d6c8..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_invalid.move +++ /dev/null @@ -1,26 +0,0 @@ -// check that `use`'s are filtered out correctly -address 0x1 { -module A { - struct Foo has drop {} - - public fun build_foo(): Foo { Foo {} } -} - -module B { - #[verify_only] - use 0x1::A::{Self, Foo}; - - #[verify_only] - fun x(_: Foo) { } - - #[verify_only] - fun tester() { - x(A::build_foo()) - } - - // this should fail - public fun bad(): Foo { - A::build_foo() - } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_valid.move deleted file mode 100644 index c141dc283e65f7..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/cross_module_valid.move +++ /dev/null @@ -1,24 +0,0 @@ -// Check that verify_only filtering and calling is supported across modules and -// different types of module members -address 0x1 { -module A { - #[verify_only] - struct Foo has drop {} - - #[verify_only] - public fun build_foo(): Foo { Foo {} } -} - -module B { - #[verify_only] - use 0x1::A::{Self, Foo}; - - #[verify_only] - fun x(_: Foo) { } - - #[verify_only] - fun tester() { - x(A::build_foo()) - } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/double_annotation.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/double_annotation.move deleted file mode 100644 index 60f63be52a6240..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/double_annotation.move +++ /dev/null @@ -1,21 +0,0 @@ -address 0x1 { -module M { - #[verify_only] - struct Foo {} - - // failure: double annotation - #[verify_only] - #[verify_only] - struct Bar {} - - public fun foo() { } - - #[verify_only] - public fun bar() { } - - // failure: double annotation - #[verify_only] - #[verify_only] - public fun d(_a: signer, _b: signer) { } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.exp b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.exp deleted file mode 100644 index 8933693cbc7f7f..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.exp +++ /dev/null @@ -1,19 +0,0 @@ - -Diagnostics: -error: undeclared `0x1::M::Foo` - ┌─ tests/more-v1/verification/noverify/single_module_invalid.move:8:23 - │ -8 │ public fun foo(): Foo { - │ ^^^ - -error: undeclared struct `M::Foo` - ┌─ tests/more-v1/verification/noverify/single_module_invalid.move:9:9 - │ -9 │ Foo {} - │ ^^^ - -error: no function named `bar` found - ┌─ tests/more-v1/verification/noverify/single_module_invalid.move:17:24 - │ -17 │ public fun baz() { bar() } - │ ^^^^^ diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.move deleted file mode 100644 index 06043755f63076..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_invalid.move +++ /dev/null @@ -1,19 +0,0 @@ -address 0x1 { -module M { - #[verify_only] - struct Foo {} - - // This should cause an unbound type error in non-verify mode - // as the Foo struct declaration was filtered out - public fun foo(): Foo { - Foo {} - } - - #[verify_only] - public fun bar() { } - - // This should cause an unbound function error in non-verify mode - // as `bar` was filtered out - public fun baz() { bar() } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_valid.move deleted file mode 100644 index a50d4ab3cf7da3..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/noverify/single_module_valid.move +++ /dev/null @@ -1,16 +0,0 @@ -// Make sure that legal usage is allowed -module 0x1::M { - // verify-only struct - #[verify_only] - struct Foo {} - - public fun foo() { } - - // verify-only struct used in a verify-only function - #[verify_only] - public fun bar(): Foo { Foo{} } - - // verify-only function used in a verify-only function - #[verify_only] - public fun baz(): Foo { bar() } -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/single_module_invalid.verification b/third_party/move/move-compiler-v2/tests/more-v1/verification/single_module_invalid.verification deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/single_module_valid.verification b/third_party/move/move-compiler-v2/tests/more-v1/verification/single_module_valid.verification deleted file mode 100644 index e69de29bb2d1d6..00000000000000 diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/cross_module_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/cross_module_valid.move deleted file mode 100644 index c141dc283e65f7..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/cross_module_valid.move +++ /dev/null @@ -1,24 +0,0 @@ -// Check that verify_only filtering and calling is supported across modules and -// different types of module members -address 0x1 { -module A { - #[verify_only] - struct Foo has drop {} - - #[verify_only] - public fun build_foo(): Foo { Foo {} } -} - -module B { - #[verify_only] - use 0x1::A::{Self, Foo}; - - #[verify_only] - fun x(_: Foo) { } - - #[verify_only] - fun tester() { - x(A::build_foo()) - } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.exp b/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.exp deleted file mode 100644 index 141935281706e2..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.exp +++ /dev/null @@ -1,20 +0,0 @@ - -Diagnostics: -error: duplicate declaration, item, or annotation - ┌─ tests/more-v1/verification/verify/double_annotation.move:8:7 - │ -7 │ #[verify_only] - │ ----------- Attribute previously given here -8 │ #[verify_only] - │ ^^^^^^^^^^^ Duplicate attribute 'verify_only' attached to the same item - -error: duplicate declaration, item, or annotation - ┌─ tests/more-v1/verification/verify/double_annotation.move:18:7 - │ -17 │ #[verify_only] - │ ----------- Attribute previously given here -18 │ #[verify_only] - │ ^^^^^^^^^^^ Duplicate attribute 'verify_only' attached to the same item - - -============ bytecode verification succeeded ======== diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.move deleted file mode 100644 index 60f63be52a6240..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/double_annotation.move +++ /dev/null @@ -1,21 +0,0 @@ -address 0x1 { -module M { - #[verify_only] - struct Foo {} - - // failure: double annotation - #[verify_only] - #[verify_only] - struct Bar {} - - public fun foo() { } - - #[verify_only] - public fun bar() { } - - // failure: double annotation - #[verify_only] - #[verify_only] - public fun d(_a: signer, _b: signer) { } -} -} diff --git a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/single_module_valid.move b/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/single_module_valid.move deleted file mode 100644 index a50d4ab3cf7da3..00000000000000 --- a/third_party/move/move-compiler-v2/tests/more-v1/verification/verify/single_module_valid.move +++ /dev/null @@ -1,16 +0,0 @@ -// Make sure that legal usage is allowed -module 0x1::M { - // verify-only struct - #[verify_only] - struct Foo {} - - public fun foo() { } - - // verify-only struct used in a verify-only function - #[verify_only] - public fun bar(): Foo { Foo{} } - - // verify-only function used in a verify-only function - #[verify_only] - public fun baz(): Foo { bar() } -} diff --git a/third_party/move/move-compiler-v2/tests/v1.matched b/third_party/move/move-compiler-v2/tests/v1.matched index c225616340f64f..788e200bbc6eb8 100644 --- a/third_party/move/move-compiler-v2/tests/v1.matched +++ b/third_party/move/move-compiler-v2/tests/v1.matched @@ -1,6 +1,7 @@ move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_1.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/borrow_global_acquires_1.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_2.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/borrow_global_acquires_2.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_3.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/borrow_global_acquires_3.exp +move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_duplicate_annotation.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/borrow_global_acquires_duplicate_annotation.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_extraneous_annotation.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/borrow_global_acquires_extraneous_annotation.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_invalid_1.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/borrow_global_acquires_invalid_1.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/borrow_global_acquires_invalid_2.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/borrow_global_acquires_invalid_2.exp @@ -29,6 +30,7 @@ move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_inva move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_valid_1.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/factor_valid_1.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/factor_valid_2.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/factor_valid_2.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_global_invalid.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/imm_borrow_global_invalid.exp +move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_global_lossy_acquire_invalid.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/borrow_tests/imm_borrow_global_lossy_acquire_invalid.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_global_requires_acquire.exp move-compiler-v2/tests/acquires-checker/v1-borrow-tests/imm_borrow_global_requires_acquire.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_loc.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/imm_borrow_loc.exp move-compiler/tests/move_check/translated_ir_tests/move/borrow_tests/imm_borrow_loc_trivial.exp move-compiler-v2/tests/reference-safety/v1-borrow-tests/imm_borrow_loc_trivial.exp @@ -131,19 +133,31 @@ move-compiler/tests/move_check/v2_tests/bytecode-generator/wildcard5.exp move- move-compiler/tests/move_check/v2_tests/bytecode-generator/wildcard6.exp move-compiler-v2/tests/bytecode-generator/wildcard6.exp move-compiler/tests/move_check/v2_tests/bytecode-generator/wildcard7.exp move-compiler-v2/tests/bytecode-generator/wildcard7.exp move-compiler/tests/move_check/v2_tests/bytecode-generator/wildcard8.exp move-compiler-v2/tests/bytecode-generator/wildcard8.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/abort_negative_stack_size.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/abort_negative_stack_size.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/assign_in_one_if_branch.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/assign_in_one_if_branch.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/assign_resource.exp move-compiler-v2/tests/ability-check/v1-borrow-tests/assign_resource.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/assign_wrong_if_branch.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/assign_wrong_if_branch.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/assign_wrong_if_branch_no_else.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/assign_wrong_if_branch_no_else.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/assign_wrong_type.exp move-compiler-v2/tests/checking/typing/v1-commands/assign_wrong_type.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/branch_assigns_then_moves.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/branch_assigns_then_moves.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/break_outside_loop.exp move-compiler-v2/tests/bytecode-generator/v1-commands/break_outside_loop.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/break_outside_loop_in_else.exp move-compiler-v2/tests/bytecode-generator/v1-commands/break_outside_loop_in_else.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/break_outside_loop_in_if.exp move-compiler-v2/tests/bytecode-generator/v1-commands/break_outside_loop_in_if.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/break_unreachable.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/break_unreachable.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/consume_stack.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/consume_stack.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/continue_outside_loop.exp move-compiler-v2/tests/bytecode-generator/v1-commands/continue_outside_loop.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/continue_outside_loop_in_if.exp move-compiler-v2/tests/bytecode-generator/v1-commands/continue_outside_loop_in_if.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/dead_return.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/dead_return.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/dead_return_local.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/dead_return_local.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/else_assigns_if_doesnt.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/else_assigns_if_doesnt.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/else_moves_if_doesnt.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/else_moves_if_doesnt.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/if_assigns_else_doesnt.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/if_assigns_else_doesnt.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/if_assigns_no_else.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/if_assigns_no_else.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/if_moves_else_doesnt.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/if_moves_else_doesnt.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/if_moves_no_else.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/if_moves_no_else.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/invalid_fallthrough2.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough2.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/invalid_fallthrough3.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/invalid_fallthrough3.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/join_failure.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/join_failure.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/mixed_lvalue.exp move-compiler-v2/tests/unused-assignment/v1-commands/mixed_lvalue.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/move_before_assign.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/move_before_assign.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/no_let_outside_if.exp move-compiler-v2/tests/checking/typing/v1-commands/no_let_outside_if.exp @@ -155,15 +169,22 @@ move-compiler/tests/move_check/translated_ir_tests/move/commands/unpack_extra_bi move-compiler/tests/move_check/translated_ir_tests/move/commands/unpack_missing_binding.exp move-compiler-v2/tests/checking/typing/v1-commands/unpack_missing_binding.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/unpack_wrong_type.exp move-compiler-v2/tests/checking/typing/v1-commands/unpack_wrong_type.exp move-compiler/tests/move_check/translated_ir_tests/move/commands/use_before_assign.exp move-compiler-v2/tests/uninit-use-checker/v1-commands/use_before_assign.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/while_move_local.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/while_move_local.exp +move-compiler/tests/move_check/translated_ir_tests/move/commands/while_move_local_2.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/commands/while_move_local_2.exp +move-compiler/tests/move_check/control_flow/for_loop_comment_following.exp move-compiler-v2/tests/more-v1/control_flow/for_loop_comment_following.exp move-compiler/tests/move_check/control_flow/for_loop_empty_novar.exp move-compiler-v2/tests/checking/control_flow/for_loop_empty_novar.exp +move-compiler/tests/move_check/control_flow/for_loop_lparen_following.exp move-compiler-v2/tests/more-v1/control_flow/for_loop_lparen_following.exp move-compiler/tests/move_check/control_flow/for_type_mismatch.exp move-compiler-v2/tests/checking/control_flow/for_type_mismatch.exp +move-compiler/tests/move_check/control_flow/infinite_loop_with_dead_exits.exp move-compiler-v2/tests/more-v1/control_flow/infinite_loop_with_dead_exits.exp move-compiler/tests/move_check/control_flow/loop_after_loop.exp move-compiler-v2/tests/checking/control_flow/loop_after_loop.exp +move-compiler/tests/move_check/deprecated/assert_function.exp move-compiler-v2/tests/deprecated/assert_function.exp move-compiler/tests/move_check/deprecated/deprecated_constant_duplicated_struct.exp move-compiler-v2/tests/deprecated/deprecated_constant_duplicated_struct.exp move-compiler/tests/move_check/deprecated/deprecated_constant_duplicated_struct2.exp move-compiler-v2/tests/deprecated/deprecated_constant_duplicated_struct2.exp move-compiler/tests/move_check/deprecated/deprecated_field_type.exp move-compiler-v2/tests/deprecated/deprecated_field_type.exp move-compiler/tests/move_check/deprecated/deprecated_field_type2.exp move-compiler-v2/tests/deprecated/deprecated_field_type2.exp move-compiler/tests/move_check/deprecated/deprecated_placement_address.exp move-compiler-v2/tests/deprecated/deprecated_placement_address.exp move-compiler/tests/move_check/deprecated/deprecated_placement_address_module_members.exp move-compiler-v2/tests/deprecated/deprecated_placement_address_module_members.exp +move-compiler/tests/move_check/deprecated/deprecated_placement_basecase.exp move-compiler-v2/tests/deprecated/deprecated_placement_basecase.exp move-compiler/tests/move_check/deprecated/deprecated_placement_members.exp move-compiler-v2/tests/deprecated/deprecated_placement_members.exp move-compiler/tests/move_check/deprecated/deprecated_placement_module.exp move-compiler-v2/tests/deprecated/deprecated_placement_module.exp move-compiler/tests/move_check/deprecated/deprecated_placement_module2.exp move-compiler-v2/tests/deprecated/deprecated_placement_module2.exp @@ -224,8 +245,24 @@ move-compiler/tests/move_check/translated_ir_tests/move/generics/instantiation_l move-compiler/tests/move_check/translated_ir_tests/move/generics/instantiation_loops/recursive_struct.exp move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_struct.exp move-compiler/tests/move_check/translated_ir_tests/move/generics/instantiation_loops/recursive_two_args_swapping_type_con.exp move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/recursive_two_args_swapping_type_con.exp move-compiler/tests/move_check/translated_ir_tests/move/generics/instantiation_loops/two_loops.exp move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/two_loops.exp +move-compiler/tests/move_check/liveness/copy_after_move.exp move-compiler-v2/tests/more-v1/liveness/copy_after_move.exp +move-compiler/tests/move_check/liveness/dead_refs_branch.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_branch.exp +move-compiler/tests/move_check/liveness/dead_refs_branch_both.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both.exp +move-compiler/tests/move_check/liveness/dead_refs_branch_both_invalid.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_both_invalid.exp +move-compiler/tests/move_check/liveness/dead_refs_branch_invalid.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_branch_invalid.exp +move-compiler/tests/move_check/liveness/dead_refs_loop.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_loop.exp +move-compiler/tests/move_check/liveness/dead_refs_loop_invalid.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_loop_invalid.exp +move-compiler/tests/move_check/liveness/dead_refs_nested.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_nested.exp +move-compiler/tests/move_check/liveness/dead_refs_nested_invalid.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_nested_invalid.exp +move-compiler/tests/move_check/liveness/dead_refs_simple.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_simple.exp +move-compiler/tests/move_check/liveness/dead_refs_simple_invalid.exp move-compiler-v2/tests/more-v1/liveness/dead_refs_simple_invalid.exp +move-compiler/tests/move_check/liveness/explicit_last_copy.exp move-compiler-v2/tests/more-v1/liveness/explicit_last_copy.exp +move-compiler/tests/move_check/liveness/loop_weirdness.exp move-compiler-v2/tests/more-v1/liveness/loop_weirdness.exp +move-compiler/tests/move_check/liveness/move_in_infinite_loop_branched.exp move-compiler-v2/tests/more-v1/liveness/move_in_infinite_loop_branched.exp move-compiler/tests/move_check/liveness/mut_inline.exp move-compiler-v2/tests/live-var/mut_inline.exp move-compiler/tests/move_check/liveness/mut_ref.exp move-compiler-v2/tests/live-var/mut_ref.exp +move-compiler/tests/move_check/liveness/trailing_semi.exp move-compiler-v2/tests/more-v1/liveness/trailing_semi.exp +move-compiler/tests/move_check/liveness/trailing_semi_loops.exp move-compiler-v2/tests/more-v1/liveness/trailing_semi_loops.exp move-compiler/tests/move_check/liveness/unused_assignment.exp move-compiler-v2/tests/unused-assignment/v1-liveness/unused_assignment.exp move-compiler/tests/move_check/locals/assign_partial_resource.exp move-compiler-v2/tests/unused-assignment/v1-locals/assign_partial_resource.exp move-compiler/tests/move_check/locals/assign_resource.exp move-compiler-v2/tests/unused-assignment/v1-locals/assign_resource.exp @@ -236,6 +273,11 @@ move-compiler/tests/move_check/locals/struct_use_before_assign.exp move-compil move-compiler/tests/move_check/locals/unused_copyable.exp move-compiler-v2/tests/unused-assignment/v1-locals/unused_copyable.exp move-compiler/tests/move_check/locals/unused_resource.exp move-compiler-v2/tests/unused-assignment/v1-locals/unused_resource.exp move-compiler/tests/move_check/locals/unused_resource_explicit_return.exp move-compiler-v2/tests/unused-assignment/v1-locals/unused_resource_explicit_return.exp +move-compiler/tests/move_check/locals/use_after_move_if.exp move-compiler-v2/tests/more-v1/locals/use_after_move_if.exp +move-compiler/tests/move_check/locals/use_after_move_if_else.exp move-compiler-v2/tests/more-v1/locals/use_after_move_if_else.exp +move-compiler/tests/move_check/locals/use_after_move_loop.exp move-compiler-v2/tests/more-v1/locals/use_after_move_loop.exp +move-compiler/tests/move_check/locals/use_after_move_simple.exp move-compiler-v2/tests/more-v1/locals/use_after_move_simple.exp +move-compiler/tests/move_check/locals/use_after_move_while.exp move-compiler-v2/tests/more-v1/locals/use_after_move_while.exp move-compiler/tests/move_check/locals/use_before_assign_if.exp move-compiler-v2/tests/uninit-use-checker/v1-locals/use_before_assign_if.exp move-compiler/tests/move_check/locals/use_before_assign_if_else.exp move-compiler-v2/tests/uninit-use-checker/v1-locals/use_before_assign_if_else.exp move-compiler/tests/move_check/locals/use_before_assign_loop.exp move-compiler-v2/tests/uninit-use-checker/v1-locals/use_before_assign_loop.exp @@ -274,21 +316,194 @@ move-compiler/tests/move_check/naming/vector_literal_type_arity.exp move-compi move-compiler/tests/move_check/translated_ir_tests/move/operators/boolean_not_non_boolean.exp move-compiler-v2/tests/checking/typing/v1-operators/boolean_not_non_boolean.exp move-compiler/tests/move_check/translated_ir_tests/move/operators/casting_operators_types_mismatch.exp move-compiler-v2/tests/checking/typing/v1-operators/casting_operators_types_mismatch.exp move-compiler/tests/move_check/parser/acquires_list_generic.exp move-compiler-v2/tests/checking-lang-v1/acquires_list_generic.exp +move-compiler/tests/move_check/parser/ability_constraint_trailing_plus.exp move-compiler-v2/tests/more-v1/parser/ability_constraint_trailing_plus.exp +move-compiler/tests/move_check/parser/ability_modifier_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/ability_modifier_trailing_comma.exp +move-compiler/tests/move_check/parser/address_misspelled.exp move-compiler-v2/tests/more-v1/parser/address_misspelled.exp +move-compiler/tests/move_check/parser/address_not_hex.exp move-compiler-v2/tests/more-v1/parser/address_not_hex.exp +move-compiler/tests/move_check/parser/address_too_long.exp move-compiler-v2/tests/more-v1/parser/address_too_long.exp +move-compiler/tests/move_check/parser/address_too_long_decimal.exp move-compiler-v2/tests/more-v1/parser/address_too_long_decimal.exp +move-compiler/tests/move_check/parser/address_too_long_decimal_exp.exp move-compiler-v2/tests/more-v1/parser/address_too_long_decimal_exp.exp +move-compiler/tests/move_check/parser/address_too_long_exp.exp move-compiler-v2/tests/more-v1/parser/address_too_long_exp.exp move-compiler/tests/move_check/parser/aptos_stdlib_attributes.exp move-compiler-v2/tests/checking/attributes/aptos_stdlib_attributes.exp move-compiler/tests/move_check/parser/aptos_stdlib_attributes2.exp move-compiler-v2/tests/checking/attributes/aptos_stdlib_attributes2.exp move-compiler/tests/move_check/parser/attribute_no_closing_bracket.exp move-compiler-v2/tests/checking/attributes/attribute_no_closing_bracket.exp move-compiler/tests/move_check/parser/attribute_num_sign_no_bracket.exp move-compiler-v2/tests/checking/attributes/attribute_num_sign_no_bracket.exp move-compiler/tests/move_check/parser/attribute_placement.exp move-compiler-v2/tests/checking/attributes/attribute_placement.exp move-compiler/tests/move_check/parser/attribute_variants.exp move-compiler-v2/tests/checking/attributes/attribute_variants.exp +move-compiler/tests/move_check/parser/break_with_value.exp move-compiler-v2/tests/more-v1/parser/break_with_value.exp +move-compiler/tests/move_check/parser/byte_string_invalid_escaped_sequence.exp move-compiler-v2/tests/more-v1/parser/byte_string_invalid_escaped_sequence.exp +move-compiler/tests/move_check/parser/byte_string_invalid_hex.exp move-compiler-v2/tests/more-v1/parser/byte_string_invalid_hex.exp +move-compiler/tests/move_check/parser/byte_string_success.exp move-compiler-v2/tests/more-v1/parser/byte_string_success.exp +move-compiler/tests/move_check/parser/byte_string_token_eof1.exp move-compiler-v2/tests/more-v1/parser/byte_string_token_eof1.exp +move-compiler/tests/move_check/parser/byte_string_token_eof2.exp move-compiler-v2/tests/more-v1/parser/byte_string_token_eof2.exp +move-compiler/tests/move_check/parser/byte_string_token_eof3.exp move-compiler-v2/tests/more-v1/parser/byte_string_token_eof3.exp +move-compiler/tests/move_check/parser/comments_nested_unbalanced.exp move-compiler-v2/tests/more-v1/parser/comments_nested_unbalanced.exp +move-compiler/tests/move_check/parser/comments_ok.exp move-compiler-v2/tests/more-v1/parser/comments_ok.exp +move-compiler/tests/move_check/parser/comments_unbalanced.exp move-compiler-v2/tests/more-v1/parser/comments_unbalanced.exp +move-compiler/tests/move_check/parser/constant_native.exp move-compiler-v2/tests/more-v1/parser/constant_native.exp +move-compiler/tests/move_check/parser/constant_public.exp move-compiler-v2/tests/more-v1/parser/constant_public.exp +move-compiler/tests/move_check/parser/constant_values.exp move-compiler-v2/tests/more-v1/parser/constant_values.exp +move-compiler/tests/move_check/parser/constants_blocks.exp move-compiler-v2/tests/more-v1/parser/constants_blocks.exp +move-compiler/tests/move_check/parser/constants_simple.exp move-compiler-v2/tests/more-v1/parser/constants_simple.exp +move-compiler/tests/move_check/parser/constants_standalone_let.exp move-compiler-v2/tests/more-v1/parser/constants_standalone_let.exp +move-compiler/tests/move_check/parser/control_exp_as_term.exp move-compiler-v2/tests/more-v1/parser/control_exp_as_term.exp +move-compiler/tests/move_check/parser/control_exp_associativity.exp move-compiler-v2/tests/more-v1/parser/control_exp_associativity.exp +move-compiler/tests/move_check/parser/control_exp_associativity_else_after_if_block.exp move-compiler-v2/tests/more-v1/parser/control_exp_associativity_else_after_if_block.exp +move-compiler/tests/move_check/parser/control_exp_associativity_field_access.exp move-compiler-v2/tests/more-v1/parser/control_exp_associativity_field_access.exp +move-compiler/tests/move_check/parser/control_exp_associativity_typing_invalid.exp move-compiler-v2/tests/more-v1/parser/control_exp_associativity_typing_invalid.exp +move-compiler/tests/move_check/parser/control_exp_associativity_unreachable_code.exp move-compiler-v2/tests/more-v1/parser/control_exp_associativity_unreachable_code.exp +move-compiler/tests/move_check/parser/decimal_address.exp move-compiler-v2/tests/more-v1/parser/decimal_address.exp +move-compiler/tests/move_check/parser/doc_comments_placement.exp move-compiler-v2/tests/more-v1/parser/doc_comments_placement.exp move-compiler/tests/move_check/parser/duplicate_attributes.exp move-compiler-v2/tests/checking/attributes/duplicate_attributes.exp +move-compiler/tests/move_check/parser/duplicate_entry_modifier.exp move-compiler-v2/tests/more-v1/parser/duplicate_entry_modifier.exp +move-compiler/tests/move_check/parser/empty_file.exp move-compiler-v2/tests/more-v1/parser/empty_file.exp +move-compiler/tests/move_check/parser/entry_const.exp move-compiler-v2/tests/more-v1/parser/entry_const.exp +move-compiler/tests/move_check/parser/entry_function.exp move-compiler-v2/tests/more-v1/parser/entry_function.exp +move-compiler/tests/move_check/parser/entry_struct.exp move-compiler-v2/tests/more-v1/parser/entry_struct.exp +move-compiler/tests/move_check/parser/expr_abort_braces.exp move-compiler-v2/tests/more-v1/parser/expr_abort_braces.exp +move-compiler/tests/move_check/parser/expr_abort_missing_value.exp move-compiler-v2/tests/more-v1/parser/expr_abort_missing_value.exp +move-compiler/tests/move_check/parser/expr_if_braces.exp move-compiler-v2/tests/more-v1/parser/expr_if_braces.exp +move-compiler/tests/move_check/parser/expr_if_missing_parens.exp move-compiler-v2/tests/more-v1/parser/expr_if_missing_parens.exp +move-compiler/tests/move_check/parser/expr_loop_braces.exp move-compiler-v2/tests/more-v1/parser/expr_loop_braces.exp +move-compiler/tests/move_check/parser/expr_return_braces.exp move-compiler-v2/tests/more-v1/parser/expr_return_braces.exp +move-compiler/tests/move_check/parser/expr_return_missing_value.exp move-compiler-v2/tests/more-v1/parser/expr_return_missing_value.exp +move-compiler/tests/move_check/parser/expr_unary_negation.exp move-compiler-v2/tests/more-v1/parser/expr_unary_negation.exp +move-compiler/tests/move_check/parser/expr_unary_ops.exp move-compiler-v2/tests/more-v1/parser/expr_unary_ops.exp +move-compiler/tests/move_check/parser/expr_while_braces.exp move-compiler-v2/tests/more-v1/parser/expr_while_braces.exp +move-compiler/tests/move_check/parser/expr_while_missing_parens.exp move-compiler-v2/tests/more-v1/parser/expr_while_missing_parens.exp +move-compiler/tests/move_check/parser/extra_text_after_main.exp move-compiler-v2/tests/more-v1/parser/extra_text_after_main.exp +move-compiler/tests/move_check/parser/friend_decl_address_only.exp move-compiler-v2/tests/more-v1/parser/friend_decl_address_only.exp +move-compiler/tests/move_check/parser/friend_decl_inside_function.exp move-compiler-v2/tests/more-v1/parser/friend_decl_inside_function.exp +move-compiler/tests/move_check/parser/friend_decl_missing_semicolon.exp move-compiler-v2/tests/more-v1/parser/friend_decl_missing_semicolon.exp +move-compiler/tests/move_check/parser/friend_decl_more_than_one_module.exp move-compiler-v2/tests/more-v1/parser/friend_decl_more_than_one_module.exp +move-compiler/tests/move_check/parser/friend_decl_qualified_function.exp move-compiler-v2/tests/more-v1/parser/friend_decl_qualified_function.exp +move-compiler/tests/move_check/parser/friend_decl_qualified_struct.exp move-compiler-v2/tests/more-v1/parser/friend_decl_qualified_struct.exp +move-compiler/tests/move_check/parser/friend_decl_valid.exp move-compiler-v2/tests/more-v1/parser/friend_decl_valid.exp +move-compiler/tests/move_check/parser/function_acquires_bad_name.exp move-compiler-v2/tests/more-v1/parser/function_acquires_bad_name.exp +move-compiler/tests/move_check/parser/function_acquires_missing_comma.exp move-compiler-v2/tests/more-v1/parser/function_acquires_missing_comma.exp +move-compiler/tests/move_check/parser/function_acquires_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/function_acquires_trailing_comma.exp +move-compiler/tests/move_check/parser/function_incomplete.exp move-compiler-v2/tests/more-v1/parser/function_incomplete.exp +move-compiler/tests/move_check/parser/function_native_with_body.exp move-compiler-v2/tests/more-v1/parser/function_native_with_body.exp +move-compiler/tests/move_check/parser/function_params_commas.exp move-compiler-v2/tests/more-v1/parser/function_params_commas.exp +move-compiler/tests/move_check/parser/function_params_missing.exp move-compiler-v2/tests/more-v1/parser/function_params_missing.exp +move-compiler/tests/move_check/parser/function_public_native.exp move-compiler-v2/tests/more-v1/parser/function_public_native.exp +move-compiler/tests/move_check/parser/function_return_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/function_return_trailing_comma.exp +move-compiler/tests/move_check/parser/function_return_type.exp move-compiler-v2/tests/more-v1/parser/function_return_type.exp +move-compiler/tests/move_check/parser/function_return_type_missing.exp move-compiler-v2/tests/more-v1/parser/function_return_type_missing.exp +move-compiler/tests/move_check/parser/function_type_empty.exp move-compiler-v2/tests/more-v1/parser/function_type_empty.exp +move-compiler/tests/move_check/parser/function_type_extra_comma.exp move-compiler-v2/tests/more-v1/parser/function_type_extra_comma.exp +move-compiler/tests/move_check/parser/function_type_missing_angle.exp move-compiler-v2/tests/more-v1/parser/function_type_missing_angle.exp +move-compiler/tests/move_check/parser/function_type_nested.exp move-compiler-v2/tests/more-v1/parser/function_type_nested.exp +move-compiler/tests/move_check/parser/function_type_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/function_type_trailing_comma.exp +move-compiler/tests/move_check/parser/function_visibility_empty.exp move-compiler-v2/tests/more-v1/parser/function_visibility_empty.exp +move-compiler/tests/move_check/parser/function_visibility_friend.exp move-compiler-v2/tests/more-v1/parser/function_visibility_friend.exp +move-compiler/tests/move_check/parser/function_visibility_invalid.exp move-compiler-v2/tests/more-v1/parser/function_visibility_invalid.exp +move-compiler/tests/move_check/parser/function_visibility_multiple.exp move-compiler-v2/tests/more-v1/parser/function_visibility_multiple.exp +move-compiler/tests/move_check/parser/function_visibility_script.exp move-compiler-v2/tests/more-v1/parser/function_visibility_script.exp +move-compiler/tests/move_check/parser/function_without_body.exp move-compiler-v2/tests/more-v1/parser/function_without_body.exp +move-compiler/tests/move_check/parser/global_access.exp move-compiler-v2/tests/more-v1/parser/global_access.exp +move-compiler/tests/move_check/parser/global_access_pack.exp move-compiler-v2/tests/more-v1/parser/global_access_pack.exp +move-compiler/tests/move_check/parser/global_access_value.exp move-compiler-v2/tests/more-v1/parser/global_access_value.exp +move-compiler/tests/move_check/parser/hexstring.exp move-compiler-v2/tests/more-v1/parser/hexstring.exp +move-compiler/tests/move_check/parser/hexstring_missing_quote.exp move-compiler-v2/tests/more-v1/parser/hexstring_missing_quote.exp +move-compiler/tests/move_check/parser/hexstring_token_eof1.exp move-compiler-v2/tests/more-v1/parser/hexstring_token_eof1.exp +move-compiler/tests/move_check/parser/hexstring_token_eof2.exp move-compiler-v2/tests/more-v1/parser/hexstring_token_eof2.exp +move-compiler/tests/move_check/parser/invalid_call_lhs_complex_expression.exp move-compiler-v2/tests/more-v1/parser/invalid_call_lhs_complex_expression.exp +move-compiler/tests/move_check/parser/invalid_call_lhs_parens_around_name.exp move-compiler-v2/tests/more-v1/parser/invalid_call_lhs_parens_around_name.exp +move-compiler/tests/move_check/parser/invalid_call_lhs_return.exp move-compiler-v2/tests/more-v1/parser/invalid_call_lhs_return.exp +move-compiler/tests/move_check/parser/invalid_call_lhs_value.exp move-compiler-v2/tests/more-v1/parser/invalid_call_lhs_value.exp +move-compiler/tests/move_check/parser/invalid_character.exp move-compiler-v2/tests/more-v1/parser/invalid_character.exp +move-compiler/tests/move_check/parser/invalid_character_comment.exp move-compiler-v2/tests/more-v1/parser/invalid_character_comment.exp +move-compiler/tests/move_check/parser/invalid_character_non_ascii.exp move-compiler-v2/tests/more-v1/parser/invalid_character_non_ascii.exp +move-compiler/tests/move_check/parser/invalid_named_address_assignment.exp move-compiler-v2/tests/more-v1/parser/invalid_named_address_assignment.exp +move-compiler/tests/move_check/parser/invalid_named_address_declaration.exp move-compiler-v2/tests/more-v1/parser/invalid_named_address_declaration.exp +move-compiler/tests/move_check/parser/invalid_pack_mname_non_addr.exp move-compiler-v2/tests/more-v1/parser/invalid_pack_mname_non_addr.exp +move-compiler/tests/move_check/parser/invalid_unpack_assign_lhs_mdot_no_addr.exp move-compiler-v2/tests/more-v1/parser/invalid_unpack_assign_lhs_mdot_no_addr.exp +move-compiler/tests/move_check/parser/invalid_unpack_assign_rhs_not_fields.exp move-compiler-v2/tests/more-v1/parser/invalid_unpack_assign_rhs_not_fields.exp +move-compiler/tests/move_check/parser/lambda_no_param.exp move-compiler-v2/tests/more-v1/parser/lambda_no_param.exp +move-compiler/tests/move_check/parser/less_than_space.exp move-compiler-v2/tests/more-v1/parser/less_than_space.exp +move-compiler/tests/move_check/parser/let_binding.exp move-compiler-v2/tests/more-v1/parser/let_binding.exp +move-compiler/tests/move_check/parser/let_binding_bad_name.exp move-compiler-v2/tests/more-v1/parser/let_binding_bad_name.exp +move-compiler/tests/move_check/parser/let_binding_missing_fields.exp move-compiler-v2/tests/more-v1/parser/let_binding_missing_fields.exp +move-compiler/tests/move_check/parser/let_binding_missing_paren.exp move-compiler-v2/tests/more-v1/parser/let_binding_missing_paren.exp +move-compiler/tests/move_check/parser/let_binding_missing_semicolon.exp move-compiler-v2/tests/more-v1/parser/let_binding_missing_semicolon.exp +move-compiler/tests/move_check/parser/let_binding_missing_type.exp move-compiler-v2/tests/more-v1/parser/let_binding_missing_type.exp +move-compiler/tests/move_check/parser/let_binding_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/let_binding_trailing_comma.exp +move-compiler/tests/move_check/parser/missing_angle_brace_close.exp move-compiler-v2/tests/more-v1/parser/missing_angle_brace_close.exp +move-compiler/tests/move_check/parser/module_missing_lbrace.exp move-compiler-v2/tests/more-v1/parser/module_missing_lbrace.exp +move-compiler/tests/move_check/parser/module_missing_rbrace.exp move-compiler-v2/tests/more-v1/parser/module_missing_rbrace.exp +move-compiler/tests/move_check/parser/module_struct_after_func.exp move-compiler-v2/tests/more-v1/parser/module_struct_after_func.exp +move-compiler/tests/move_check/parser/module_use_after_func.exp move-compiler-v2/tests/more-v1/parser/module_use_after_func.exp +move-compiler/tests/move_check/parser/module_use_after_struct.exp move-compiler-v2/tests/more-v1/parser/module_use_after_struct.exp +move-compiler/tests/move_check/parser/named_address.exp move-compiler-v2/tests/more-v1/parser/named_address.exp +move-compiler/tests/move_check/parser/named_address_value.exp move-compiler-v2/tests/more-v1/parser/named_address_value.exp +move-compiler/tests/move_check/parser/native_main.exp move-compiler-v2/tests/more-v1/parser/native_main.exp +move-compiler/tests/move_check/parser/newline_crlf.exp move-compiler-v2/tests/more-v1/parser/newline_crlf.exp +move-compiler/tests/move_check/parser/not_doc_comment.exp move-compiler-v2/tests/more-v1/parser/not_doc_comment.exp +move-compiler/tests/move_check/parser/num_hex_literal_underscore_leading.exp move-compiler-v2/tests/more-v1/parser/num_hex_literal_underscore_leading.exp +move-compiler/tests/move_check/parser/num_hex_literal_underscore_leading_no_type_suffix.exp move-compiler-v2/tests/more-v1/parser/num_hex_literal_underscore_leading_no_type_suffix.exp +move-compiler/tests/move_check/parser/num_hex_literal_underscore_trailing.exp move-compiler-v2/tests/more-v1/parser/num_hex_literal_underscore_trailing.exp +move-compiler/tests/move_check/parser/num_literal_underscore.exp move-compiler-v2/tests/more-v1/parser/num_literal_underscore.exp +move-compiler/tests/move_check/parser/num_literal_underscore_leading.exp move-compiler-v2/tests/more-v1/parser/num_literal_underscore_leading.exp +move-compiler/tests/move_check/parser/num_literal_underscore_leading_no_type_suffix.exp move-compiler-v2/tests/more-v1/parser/num_literal_underscore_leading_no_type_suffix.exp +move-compiler/tests/move_check/parser/num_literal_underscore_trailing.exp move-compiler-v2/tests/more-v1/parser/num_literal_underscore_trailing.exp +move-compiler/tests/move_check/parser/phantom_param_invalid_keyword.exp move-compiler-v2/tests/more-v1/parser/phantom_param_invalid_keyword.exp +move-compiler/tests/move_check/parser/phantom_param_missing_type_var.exp move-compiler-v2/tests/more-v1/parser/phantom_param_missing_type_var.exp +move-compiler/tests/move_check/parser/preserve_address_syntax.exp move-compiler-v2/tests/more-v1/parser/preserve_address_syntax.exp +move-compiler/tests/move_check/parser/return_in_binop.exp move-compiler-v2/tests/more-v1/parser/return_in_binop.exp +move-compiler/tests/move_check/parser/spec_parsing_emits_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_emits_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_fun_type_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_fun_type_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_generic_condition_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_generic_condition_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_implies_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_implies_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_index_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_index_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_inside_fun.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_inside_fun.exp +move-compiler/tests/move_check/parser/spec_parsing_ok.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_ok.exp +move-compiler/tests/move_check/parser/spec_parsing_old_fun_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_old_fun_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_quantifier_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_quantifier_fail.exp +move-compiler/tests/move_check/parser/spec_parsing_range_fail.exp move-compiler-v2/tests/more-v1/parser/spec_parsing_range_fail.exp +move-compiler/tests/move_check/parser/struct_field_missing_type.exp move-compiler-v2/tests/more-v1/parser/struct_field_missing_type.exp +move-compiler/tests/move_check/parser/struct_missing_lbrace.exp move-compiler-v2/tests/more-v1/parser/struct_missing_lbrace.exp +move-compiler/tests/move_check/parser/struct_native_missing_semicolon.exp move-compiler-v2/tests/more-v1/parser/struct_native_missing_semicolon.exp +move-compiler/tests/move_check/parser/struct_native_with_fields.exp move-compiler-v2/tests/more-v1/parser/struct_native_with_fields.exp +move-compiler/tests/move_check/parser/struct_public.exp move-compiler-v2/tests/more-v1/parser/struct_public.exp +move-compiler/tests/move_check/parser/struct_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/struct_trailing_comma.exp +move-compiler/tests/move_check/parser/struct_type_empty.exp move-compiler-v2/tests/more-v1/parser/struct_type_empty.exp +move-compiler/tests/move_check/parser/struct_type_extra_comma.exp move-compiler-v2/tests/more-v1/parser/struct_type_extra_comma.exp +move-compiler/tests/move_check/parser/struct_type_missing_angle.exp move-compiler-v2/tests/more-v1/parser/struct_type_missing_angle.exp +move-compiler/tests/move_check/parser/struct_type_misspelled_copy_constraint.exp move-compiler-v2/tests/more-v1/parser/struct_type_misspelled_copy_constraint.exp +move-compiler/tests/move_check/parser/struct_type_misspelled_key_constraint.exp move-compiler-v2/tests/more-v1/parser/struct_type_misspelled_key_constraint.exp +move-compiler/tests/move_check/parser/struct_type_trailing_comma.exp move-compiler-v2/tests/more-v1/parser/struct_type_trailing_comma.exp +move-compiler/tests/move_check/parser/struct_without_fields.exp move-compiler-v2/tests/more-v1/parser/struct_without_fields.exp +move-compiler/tests/move_check/parser/testonly.exp move-compiler-v2/tests/more-v1/parser/testonly.exp +move-compiler/tests/move_check/parser/unexpected_token_after_ability_function_constraint.exp move-compiler-v2/tests/more-v1/parser/unexpected_token_after_ability_function_constraint.exp +move-compiler/tests/move_check/parser/unexpected_token_after_ability_modifier.exp move-compiler-v2/tests/more-v1/parser/unexpected_token_after_ability_modifier.exp +move-compiler/tests/move_check/parser/unknown_ability_name_function_constraint.exp move-compiler-v2/tests/more-v1/parser/unknown_ability_name_function_constraint.exp +move-compiler/tests/move_check/parser/unknown_ability_name_modifier.exp move-compiler-v2/tests/more-v1/parser/unknown_ability_name_modifier.exp +move-compiler/tests/move_check/parser/use_inner_scope.exp move-compiler-v2/tests/more-v1/parser/use_inner_scope.exp +move-compiler/tests/move_check/parser/use_inner_scope_invalid.exp move-compiler-v2/tests/more-v1/parser/use_inner_scope_invalid.exp +move-compiler/tests/move_check/parser/use_inner_scope_invalid_inner.exp move-compiler-v2/tests/more-v1/parser/use_inner_scope_invalid_inner.exp +move-compiler/tests/move_check/parser/use_module_member.exp move-compiler-v2/tests/more-v1/parser/use_module_member.exp +move-compiler/tests/move_check/parser/use_module_member_invalid_comma.exp move-compiler-v2/tests/more-v1/parser/use_module_member_invalid_comma.exp +move-compiler/tests/move_check/parser/use_module_member_invalid_missing_close_brace.exp move-compiler-v2/tests/more-v1/parser/use_module_member_invalid_missing_close_brace.exp +move-compiler/tests/move_check/parser/use_module_member_invalid_missing_semicolon.exp move-compiler-v2/tests/more-v1/parser/use_module_member_invalid_missing_semicolon.exp +move-compiler/tests/move_check/parser/use_with_address.exp move-compiler-v2/tests/more-v1/parser/use_with_address.exp +move-compiler/tests/move_check/parser/use_with_main.exp move-compiler-v2/tests/more-v1/parser/use_with_main.exp +move-compiler/tests/move_check/parser/use_with_module.exp move-compiler-v2/tests/more-v1/parser/use_with_module.exp +move-compiler/tests/move_check/parser/vector_literal_unclosed_args.exp move-compiler-v2/tests/more-v1/parser/vector_literal_unclosed_args.exp +move-compiler/tests/move_check/parser/vector_literal_unclosed_type_args.exp move-compiler-v2/tests/more-v1/parser/vector_literal_unclosed_type_args.exp +move-compiler/tests/move_check/parser/vector_space_after_less.exp move-compiler-v2/tests/more-v1/parser/vector_space_after_less.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/address_arg_is_not_signer.exp move-compiler-v2/tests/ability-check/v1-signer/address_arg_is_not_signer.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/copy_loc.exp move-compiler-v2/tests/ability-check/v1-signer/copy_loc.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/copy_loc_transitive.exp move-compiler-v2/tests/ability-check/v1-signer/copy_loc_transitive.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/does_not_have_store.exp move-compiler-v2/tests/ability-check/v1-signer/does_not_have_store.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/double_signer.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/double_signer.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/invalid_move_to_sender.exp move-compiler-v2/tests/ability-check/v1-signer/invalid_move_to_sender.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/keyword.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/keyword.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/misplaced_signer_arg.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/misplaced_signer_arg.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_extra_arg.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_extra_arg.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_missing_resource.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_missing_resource.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_missing_signer.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_missing_signer.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_mutable_signer.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_mutable_signer.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_no_args.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_no_args.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_non_resource.exp move-compiler-v2/tests/ability-check/v1-signer/move_to_non_resource.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_non_signer.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_non_signer.exp @@ -296,10 +511,20 @@ move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_non_struc move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_reference_to_args_flipped.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_reference_to_args_flipped.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_reference_to_resource.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_reference_to_resource.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_reference_to_wrong_resource.exp move-compiler-v2/tests/checking/typing/v1-signer/move_to_reference_to_wrong_resource.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_sender.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_sender.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/move_to_valid.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/move_to_valid.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/read_ref.exp move-compiler-v2/tests/ability-check/v1-signer/read_ref.exp move-compiler/tests/move_check/translated_ir_tests/move/signer/read_ref_transitive.exp move-compiler-v2/tests/ability-check/v1-signer/read_ref_transitive.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/st_loc.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/st_loc_partial.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/st_loc_partial.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/transitive.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/transitive.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/triple_signer.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/triple_signer.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/unused.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/unused_partial.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/unused_partial.exp +move-compiler/tests/move_check/translated_ir_tests/move/signer/write_ref.exp move-compiler-v2/tests/more-v1/translated_ir_tests/move/signer/write_ref.exp move-compiler/tests/move_check/simplifier/moved_var_not_simplified.exp move-compiler-v2/tests/simplifier/moved_var_not_simplified.exp move-compiler/tests/move_check/simplifier/moved_var_not_simplified2.exp move-compiler-v2/tests/simplifier/moved_var_not_simplified2.exp +move-compiler/tests/move_check/simplifier/moved_var_not_simplified3.exp move-compiler-v2/tests/more-v1/simplifier/moved_var_not_simplified3.exp move-compiler/tests/move_check/skip_attribute_checks/aptos_stdlib_attributes.exp move-compiler-v2/tests/skip_attribute_checks/aptos_stdlib_attributes.exp move-compiler/tests/move_check/skip_attribute_checks/aptos_stdlib_attributes2.exp move-compiler-v2/tests/skip_attribute_checks/aptos_stdlib_attributes2.exp move-compiler/tests/move_check/skip_attribute_checks/attribute_no_closing_bracket.exp move-compiler-v2/tests/skip_attribute_checks/attribute_no_closing_bracket.exp @@ -309,11 +534,13 @@ move-compiler/tests/move_check/skip_attribute_checks/duplicate_attributes.exp move-compiler/tests/move_check/skip_attribute_checks/extra_attributes.exp move-compiler-v2/tests/skip_attribute_checks/extra_attributes.exp move-compiler/tests/move_check/skip_attribute_checks/extra_attributes2.exp move-compiler-v2/tests/skip_attribute_checks/extra_attributes2.exp move-compiler/tests/move_check/skip_attribute_checks/testonly.exp move-compiler-v2/tests/skip_attribute_checks/testonly.exp +move-compiler/tests/move_check/to_bytecode/unassigned_address.exp move-compiler-v2/tests/more-v1/to_bytecode/unassigned_address.exp move-compiler/tests/move_check/typing/ability_constraint_generic_in_field.exp move-compiler-v2/tests/checking/abilities/v1/ability_constraint_generic_in_field.exp move-compiler/tests/move_check/typing/ability_constraint_prims_invalid.exp move-compiler-v2/tests/checking/abilities/v1/ability_constraint_prims_invalid.exp move-compiler/tests/move_check/typing/ability_constraint_structs_invalid.exp move-compiler-v2/tests/checking/abilities/v1/ability_constraint_structs_invalid.exp move-compiler/tests/move_check/typing/ability_constraint_tparams_invalid.exp move-compiler-v2/tests/checking/abilities/v1/ability_constraint_tparams_invalid.exp move-compiler/tests/move_check/typing/ability_constraints.exp move-compiler-v2/tests/checking/abilities/v1/ability_constraints.exp +move-compiler/tests/move_check/typing/abort_any_type.exp move-compiler-v2/tests/more-v1/typing/abort_any_type.exp move-compiler/tests/move_check/typing/annotated_types.exp move-compiler-v2/tests/checking/typing/annotated_types.exp move-compiler/tests/move_check/typing/assign_duplicate_assigning.exp move-compiler-v2/tests/checking/typing/assign_duplicate_assigning.exp move-compiler/tests/move_check/typing/assign_nested.exp move-compiler-v2/tests/checking/typing/assign_nested.exp @@ -374,6 +601,7 @@ move-compiler/tests/move_check/typing/block_single_expr.exp move-compiler-v2/t move-compiler/tests/move_check/typing/block_single_expr_invalid.exp move-compiler-v2/tests/checking/typing/block_single_expr_invalid.exp move-compiler/tests/move_check/typing/block_with_statements.exp move-compiler-v2/tests/checking/typing/block_with_statements.exp move-compiler/tests/move_check/typing/block_with_statements_invalid.exp move-compiler-v2/tests/checking/typing/block_with_statements_invalid.exp +move-compiler/tests/move_check/typing/borrow_divergent.exp move-compiler-v2/tests/more-v1/typing/borrow_divergent.exp move-compiler/tests/move_check/typing/borrow_field.exp move-compiler-v2/tests/checking/typing/borrow_field.exp move-compiler/tests/move_check/typing/borrow_field_chain.exp move-compiler-v2/tests/checking/typing/borrow_field_chain.exp move-compiler/tests/move_check/typing/borrow_field_chain_missing.exp move-compiler-v2/tests/checking/typing/borrow_field_chain_missing.exp @@ -409,14 +637,18 @@ move-compiler/tests/move_check/typing/constant_unsupported_exps.exp move-compi move-compiler/tests/move_check/typing/constraints_not_satisfied_all_cases.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_all_cases.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_function_parameter.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_function_parameter.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_function_return_type.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_function_return_type.exp +move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_bind_type.exp move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_lvalues_bind_type.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_decl_type.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_lvalues_decl_type.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_lvalues_pack_type_args.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_lvalues_pack_type_args.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_struct_field.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_struct_field.exp +move-compiler/tests/move_check/typing/constraints_not_satisfied_type_annotation.exp move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_annotation.exp move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_call.exp move-compiler-v2/tests/ability-check/v1-typing/constraints_not_satisfied_type_arguments_internal_call.exp +move-compiler/tests/move_check/typing/constraints_not_satisfied_type_arguments_internal_pack.exp move-compiler-v2/tests/more-v1/typing/constraints_not_satisfied_type_arguments_internal_pack.exp move-compiler/tests/move_check/typing/continue_any_type.exp move-compiler-v2/tests/checking/typing/continue_any_type.exp move-compiler/tests/move_check/typing/continue_outside_loop.exp move-compiler-v2/tests/checking/typing/continue_outside_loop.exp move-compiler/tests/move_check/typing/decl_unpack_references.exp move-compiler-v2/tests/checking/typing/decl_unpack_references.exp move-compiler/tests/move_check/typing/declare_duplicate_binding.exp move-compiler-v2/tests/checking/typing/declare_duplicate_binding.exp +move-compiler/tests/move_check/typing/declare_pop_resource.exp move-compiler-v2/tests/more-v1/typing/declare_pop_resource.exp move-compiler/tests/move_check/typing/declare_with_type_annot.exp move-compiler-v2/tests/checking/typing/declare_with_type_annot.exp move-compiler/tests/move_check/typing/declare_wrong_arity.exp move-compiler-v2/tests/checking/typing/declare_wrong_arity.exp move-compiler/tests/move_check/typing/declare_wrong_type.exp move-compiler-v2/tests/checking/typing/declare_wrong_type.exp @@ -502,6 +734,7 @@ move-compiler/tests/move_check/typing/mutate_resource.exp move-compiler-v2/tes move-compiler/tests/move_check/typing/native_structs_pack_unpack.exp move-compiler-v2/tests/checking/typing/native_structs_pack_unpack.exp move-compiler/tests/move_check/typing/neq.exp move-compiler-v2/tests/checking/typing/neq.exp move-compiler/tests/move_check/typing/neq_invalid.exp move-compiler-v2/tests/checking/typing/neq_invalid.exp +move-compiler/tests/move_check/typing/non_phantom_in_phantom_pos.exp move-compiler-v2/tests/more-v1/typing/non_phantom_in_phantom_pos.exp move-compiler/tests/move_check/typing/number_literal_too_large.exp move-compiler-v2/tests/checking/typing/number_literal_too_large.exp move-compiler/tests/move_check/typing/other_builtins.exp move-compiler-v2/tests/checking/typing/other_builtins.exp move-compiler/tests/move_check/typing/other_builtins_invalid.exp move-compiler-v2/tests/checking/typing/other_builtins_invalid.exp @@ -572,6 +805,7 @@ move-compiler/tests/move_check/typing/uninferred_type_unpack_bind.exp move-com move-compiler/tests/move_check/typing/uninferred_type_unpack_decl.exp move-compiler-v2/tests/checking/typing/uninferred_type_unpack_decl.exp move-compiler/tests/move_check/typing/unit.exp move-compiler-v2/tests/checking/typing/unit.exp move-compiler/tests/move_check/typing/unused_local.exp move-compiler-v2/tests/checking/typing/unused_local.exp +move-compiler/tests/move_check/typing/unused_non_phantom_param.exp move-compiler-v2/tests/more-v1/typing/unused_non_phantom_param.exp move-compiler/tests/move_check/typing/use_local.exp move-compiler-v2/tests/checking/typing/use_local.exp move-compiler/tests/move_check/typing/valid_acquire.exp move-compiler-v2/tests/acquires-checker/v1-tests/valid_acquire.exp move-compiler/tests/move_check/typing/values.exp move-compiler-v2/tests/checking/typing/values.exp @@ -644,6 +878,7 @@ move-compiler/tests/move_check/unit_test/test_filter_function.exp move-compile move-compiler/tests/move_check/unit_test/test_filter_struct.exp move-compiler-v2/tests/unit_test/notest/test_filter_struct.exp move-compiler/tests/move_check/unit_test/valid_test_module.exp move-compiler-v2/tests/unit_test/notest/valid_test_module.exp move-compiler/tests/move_check/unit_test/valid_test_module.unit_test.exp move-compiler-v2/tests/unit_test/test/valid_test_module.exp +move-compiler/tests/move_check/v2-not-supported/no_receiver_calls.exp move-compiler-v2/tests/more-v1/v2-not-supported/no_receiver_calls.exp move-compiler/tests/move_check/verification/cross_module_invalid.exp move-compiler-v2/tests/verification/noverify/cross_module_invalid.exp move-compiler/tests/move_check/verification/cross_module_valid.exp move-compiler-v2/tests/verification/noverify/cross_module_valid.exp move-compiler/tests/move_check/verification/cross_module_valid.verification.exp move-compiler-v2/tests/verification/verify/cross_module_valid.exp diff --git a/third_party/move/move-compiler-v2/transactional-tests/tests/more-v1/generics/global_invalid.exp b/third_party/move/move-compiler-v2/transactional-tests/tests/more-v1/generics/global_invalid.exp index 6cde19edde110b..458a79b88a3247 100644 --- a/third_party/move/move-compiler-v2/transactional-tests/tests/more-v1/generics/global_invalid.exp +++ b/third_party/move/move-compiler-v2/transactional-tests/tests/more-v1/generics/global_invalid.exp @@ -87,7 +87,7 @@ comparison between v1 and v2 failed: = ┌─ TEMPFILE2:28:9 = │ = 28 │ M::test_resource(&account) -= │ ^ Unbound module alias 'M' += │ ^ Unbound module or type alias 'M' = = = diff --git a/third_party/move/move-compiler-v2/transactional-tests/tests/v1.matched b/third_party/move/move-compiler-v2/transactional-tests/tests/v1.matched index db793a356d40ee..42fe3260803493 100644 --- a/third_party/move/move-compiler-v2/transactional-tests/tests/v1.matched +++ b/third_party/move/move-compiler-v2/transactional-tests/tests/v1.matched @@ -77,6 +77,7 @@ move-compiler/transactional-tests/tests/evaluation_order/lazy_assert.exp move- move-compiler/transactional-tests/tests/evaluation_order/short_circuiting.exp move-compiler-v2/transactional-tests/tests/evaluation_order/short_circuiting.exp move-compiler/transactional-tests/tests/evaluation_order/short_circuiting_invalid.exp move-compiler-v2/transactional-tests/tests/evaluation_order/short_circuiting_invalid.exp move-compiler/transactional-tests/tests/evaluation_order/struct_arguments.exp move-compiler-v2/transactional-tests/tests/evaluation_order/struct_arguments.exp +move-compiler/transactional-tests/tests/generics/global_invalid.exp move-compiler-v2/transactional-tests/tests/more-v1/generics/global_invalid.exp move-compiler/transactional-tests/tests/inlining/bug_10991.exp move-compiler-v2/transactional-tests/tests/inlining/bug_10991.exp move-compiler/transactional-tests/tests/inlining/bug_10991_noparam.exp move-compiler-v2/transactional-tests/tests/inlining/bug_10991_noparam.exp move-compiler/transactional-tests/tests/inlining/bug_10991_noparam2.exp move-compiler-v2/transactional-tests/tests/inlining/bug_10991_noparam2.exp @@ -119,5 +120,14 @@ move-compiler/transactional-tests/tests/operators/casting_operators.exp move-c move-compiler/transactional-tests/tests/operators/comparison_operators.exp move-compiler-v2/transactional-tests/tests/operators/comparison_operators.exp move-compiler/transactional-tests/tests/operators/precedence.exp move-compiler-v2/transactional-tests/tests/operators/precedence.exp move-compiler/transactional-tests/tests/operators/shift_operators.exp move-compiler-v2/transactional-tests/tests/operators/shift_operators.exp +move-compiler/transactional-tests/tests/parser/byte_string.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/byte_string.exp +move-compiler/transactional-tests/tests/parser/control_exp_associativity.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/control_exp_associativity.exp +move-compiler/transactional-tests/tests/parser/expr_binary_operators.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/expr_binary_operators.exp +move-compiler/transactional-tests/tests/parser/hex_and_decimal_address.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/hex_and_decimal_address.exp +move-compiler/transactional-tests/tests/parser/hex_and_decimal_numbers.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/hex_and_decimal_numbers.exp +move-compiler/transactional-tests/tests/parser/hexstring.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/hexstring.exp +move-compiler/transactional-tests/tests/parser/num_literal_underscore.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/num_literal_underscore.exp +move-compiler/transactional-tests/tests/parser/precedence.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/precedence.exp +move-compiler/transactional-tests/tests/parser/return_not_binary.exp move-compiler-v2/transactional-tests/tests/more-v1/parser/return_not_binary.exp move-compiler/transactional-tests/tests/simplifier/conditional_borrow.exp move-compiler-v2/transactional-tests/tests/simplifier/conditional_borrow.exp move-compiler/transactional-tests/tests/simplifier/constant_folding_ristretto.exp move-compiler-v2/transactional-tests/tests/simplifier/constant_folding_ristretto.exp diff --git a/third_party/move/move-compiler-v2/transactional-tests/tests/v1.unmatched b/third_party/move/move-compiler-v2/transactional-tests/tests/v1.unmatched index f5a88eab7ccc3a..e69de29bb2d1d6 100644 --- a/third_party/move/move-compiler-v2/transactional-tests/tests/v1.unmatched +++ b/third_party/move/move-compiler-v2/transactional-tests/tests/v1.unmatched @@ -1,14 +0,0 @@ -move-compiler/transactional-tests/tests/generics/{ - global_invalid.move, -} -move-compiler/transactional-tests/tests/parser/{ - byte_string.move, - control_exp_associativity.move, - expr_binary_operators.move, - hex_and_decimal_address.move, - hex_and_decimal_numbers.move, - hexstring.move, - num_literal_underscore.move, - precedence.move, - return_not_binary.move, -}