diff --git a/compiler/src/value/value.rs b/compiler/src/value/value.rs index d50f93f2fb..a1ecb7b995 100644 --- a/compiler/src/value/value.rs +++ b/compiler/src/value/value.rs @@ -229,8 +229,15 @@ impl> ConstrainedValue { } } + /// + /// Modifies the `self` [ConstrainedValue] so there are no `mut` keywords wrapping the `self` value. + /// pub(crate) fn get_inner_mut(&mut self) { if let ConstrainedValue::Mutable(inner) = self { + // Recursively remove `mut` keywords. + inner.get_inner_mut(); + + // Modify the value. *self = *inner.clone() } }