From 2207559161a0fa9ca59ed5a435440855b1e92140 Mon Sep 17 00:00:00 2001 From: Vineeth Kashyap Date: Wed, 10 Apr 2024 12:40:06 -0400 Subject: [PATCH] rebase update --- .../moved_var_not_simplified3.exp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/third_party/move/move-compiler-v2/tests/bytecode-generator/moved_var_not_simplified3.exp b/third_party/move/move-compiler-v2/tests/bytecode-generator/moved_var_not_simplified3.exp index 3755b319d9967a..fa669c34cd5839 100644 --- a/third_party/move/move-compiler-v2/tests/bytecode-generator/moved_var_not_simplified3.exp +++ b/third_party/move/move-compiler-v2/tests/bytecode-generator/moved_var_not_simplified3.exp @@ -21,11 +21,20 @@ public fun m::test(): u8 { var $t0: u8 var $t1: u8 var $t2: u8 + var $t3: u8 0: $t1 := 40 1: $t2 := move($t1) - 2: $t0 := infer($t2) - 3: return $t0 + 2: $t3 := infer($t1) + 3: $t0 := infer($t2) + 4: return $t0 } -============ bytecode verification succeeded ======== +Diagnostics: +error: cannot move local `x` since it is still in use + ┌─ tests/bytecode-generator/moved_var_not_simplified3.move:4:17 + │ +4 │ let y = move x; + │ ^^^^^^ attempted to move here +5 │ let _ = x; + │ - used here