diff options
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r-- | tvix/eval/src/vm.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index c833d7b191d7..332398d7b9ff 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -173,6 +173,13 @@ impl VM { } } + OpCode::OpAttrsIsSet => { + let key = self.pop().as_string()?; + let attrs = self.pop().as_attrs()?; + let result = Value::Bool(attrs.select(key.as_str()).is_some()); + self.push(result); + } + OpCode::OpList(count) => { let list = NixList::construct(count, self.stack.split_off(self.stack.len() - count)); |