Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Jul 9, 2024
1 parent ce9a116 commit 528f7f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions third_party/move/move-compiler-v2/tests/checking-lang-v1/index.exp
Original file line number Diff line number Diff line change
Expand Up @@ -4,88 +4,88 @@ error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:11:17
11 │ assert!((test::R[@0x1]).value == true, 0);
│ ^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:15:9
15 │ 0x42::test::R[@0x1].value = false;
│ ^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:16:17
16 │ assert!(R[@0x1].value == false, 1);
│ ^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:38:17
38 │ assert!(test::Y<X<bool>>[@0x1].field.value == true, 0);
│ ^^^^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:43:22
43 │ let y = &mut 0x42::test ::Y<X<bool>> [addr];
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:45:17
45 │ assert!(Y<X<bool>>[addr].field.value == false, 1);
│ ^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^^^^^^^^^^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:53:17
53 │ assert!(v[0].value == 2, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:70:17
70 │ assert!(v[0].field.value == true, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:71:17
71 │ assert!(v[1].field.value == false, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:88:17
88 │ assert!(v[0].field.value == true, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:89:17
89 │ assert!(v[1].field.value == false, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:90:9
90 │ v[0].field.value = false;
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:91:9
91 │ v[1].field.value = true;
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:92:17
92 │ assert!(v[0].field.value == false, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

error: unsupported language construct
┌─ tests/checking-lang-v1/index.move:93:17
93 │ assert!(v[1].field.value == true, 0);
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond
2 changes: 1 addition & 1 deletion third_party/move/move-compiler/src/expansion/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ fn exp_(context: &mut Context, sp!(loc, pe_): P::Exp) -> E::Exp {
Syntax::UnsupportedLanguageItem,
(
loc,
"`_[_]` index operator in non-specification code only allowed in Move 2"
"`_[_]` index operator in non-specification code only allowed in Move 2 and beyond"
)
));
EE::UnresolvedError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ error[E01013]: unsupported language construct
┌─ tests/move_check/parser/spec_parsing_index_fail.move:3:15
3 │ let _ = x[1];
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2
│ ^^^^ `_[_]` index operator in non-specification code only allowed in Move 2 and beyond

0 comments on commit 528f7f8

Please sign in to comment.