Fix merging child stack into parent (#12426)

# Description
Fixes #12423 where changes to mutable variables are not properly
persisted after a REPL entry.
This commit is contained in:
Ian Manske
2024-04-06 15:03:22 +00:00
committed by GitHub
parent eb36dbb091
commit 03667bdf8c
5 changed files with 33 additions and 19 deletions

View File

@ -337,12 +337,6 @@ impl PluginTest {
// All equal, and same length
Ok(true)
}
(Value::Range { val: a_rng, .. }, Value::Range { val: b_rng, .. }) => {
Ok(a_rng.inclusion == b_rng.inclusion
&& self.value_eq(&a_rng.from, &b_rng.from)?
&& self.value_eq(&a_rng.to, &b_rng.to)?
&& self.value_eq(&a_rng.incr, &b_rng.incr)?)
}
// Must collect lazy records to compare.
(Value::LazyRecord { val: a_val, .. }, _) => self.value_eq(&a_val.collect()?, b),
(_, Value::LazyRecord { val: b_val, .. }) => self.value_eq(a, &b_val.collect()?),