diff --git a/inputs/failing/exceptions/snapshotThis.ts b/inputs/passing/exceptions/snapshotThis.ts similarity index 84% rename from inputs/failing/exceptions/snapshotThis.ts rename to inputs/passing/exceptions/snapshotThis.ts index ef248584..ff2c2b1f 100644 --- a/inputs/failing/exceptions/snapshotThis.ts +++ b/inputs/passing/exceptions/snapshotThis.ts @@ -1,5 +1,4 @@ -//! test_output(1) -// (Should be 0.) +//! test_output(0) export default function main() { let foo = new Foo(); diff --git a/valuescript_compiler/src/function_compiler.rs b/valuescript_compiler/src/function_compiler.rs index ea172695..84e42b17 100644 --- a/valuescript_compiler/src/function_compiler.rs +++ b/valuescript_compiler/src/function_compiler.rs @@ -849,10 +849,6 @@ impl FunctionCompiler { let snap_registers = self.get_mutated_registers(try_.block.span); for reg in snap_registers { - if !reg.is_named() { - continue; - } - let snap_reg = self.allocate_reg_fresh(&format!("snap_{}", reg.name)); self.push(Instruction::Mov(