about summary refs log tree commit diff
path: root/src/interpret/operator.rs
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-03-03 02:30:46 +0100
committerMel <einebeere@gmail.com>2022-03-03 02:30:46 +0100
commitf5bb7bbd8824a20c991587d5a774644aa98241d9 (patch)
treec8729e0e1a04f2c924b5351f57fb9b2ec18d4633 /src/interpret/operator.rs
parent8f7e3d1d2cd43d30ccc16799fcf69058ccc5a717 (diff)
downloadrabbithole-f5bb7bbd8824a20c991587d5a774644aa98241d9.tar.zst
rabbithole-f5bb7bbd8824a20c991587d5a774644aa98241d9.zip
Allow returns without value HEAD main
Diffstat (limited to 'src/interpret/operator.rs')
-rw-r--r--src/interpret/operator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interpret/operator.rs b/src/interpret/operator.rs
index 057f942..9a68a7f 100644
--- a/src/interpret/operator.rs
+++ b/src/interpret/operator.rs
@@ -280,7 +280,7 @@ impl<'t> ValueOperator<'t> {
             Err(WalkerError {
                 kind: WalkerErrorKind::Return(returned_value),
                 ..
-            }) => Ok(returned_value),
+            }) => Ok(returned_value.unwrap_or_else(|| Value::void(self.types))),
             Err(x) => Err(CallError::InsideFunction(x)),
         }
     }