diff options
Diffstat (limited to 'src/eval/scope.rs')
| -rw-r--r-- | src/eval/scope.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eval/scope.rs b/src/eval/scope.rs index d4338b5c..e241cac5 100644 --- a/src/eval/scope.rs +++ b/src/eval/scope.rs @@ -163,7 +163,9 @@ impl Slot { fn write(&mut self) -> StrResult<&mut Value> { match self.kind { Kind::Normal => Ok(&mut self.value), - Kind::Captured => Err("cannot mutate a captured variable")?, + Kind::Captured => { + Err("variables from outside the function are read-only and cannot be modified")? + } } } } |
