fix(tvix/eval): null
in dynamic attribute keys skips the element
This is actually *tested* behaviour in C++ Nix, so we need to implement it here, too. Change-Id: Ic4a4659a2f04cdd928cbe78a85dae90401515371 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6199 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
e041851581
commit
2ea71aa4c3
1 changed files with 7 additions and 0 deletions
|
@ -203,6 +203,13 @@ impl NixAttrs {
|
|||
)?;
|
||||
}
|
||||
|
||||
Value::Null => {
|
||||
// This is in fact valid, but leads to the value
|
||||
// being ignored and nothing being set, i.e. `{
|
||||
// ${null} = 1; } => { }`.
|
||||
continue;
|
||||
}
|
||||
|
||||
other => {
|
||||
return Err(Error::InvalidKeyType {
|
||||
given: other.type_of(),
|
||||
|
|
Loading…
Reference in a new issue