feat(tvix/eval): warn on empty let-bindings
Change-Id: Ib6ef7ce514abbd3e372dfe9df7137aa36dbda9d4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7770 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
61b8a9b2ba
commit
aadf71a6ed
2 changed files with 10 additions and 1 deletions
|
|
@ -647,6 +647,9 @@ impl Compiler<'_> {
|
|||
self.emit_constant(Value::Attrs(Box::new(NixAttrs::empty())), node);
|
||||
return;
|
||||
}
|
||||
|
||||
self.emit_warning(node, WarningKind::EmptyLet);
|
||||
return;
|
||||
}
|
||||
|
||||
// Actually bind values and ensure they are on the stack.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue