feat(tvix/eval): implement "formals" function parameters

The comment explains how this works fairly well.

Note that this does not yet have the ability to check "closed
formals", i.e. without an ellipsis Tvix will *NOT* fail if unexpected
attribute set keys are provided.

Change-Id: I0d2b77e893243093d2789baa57f876d35d0a32ff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6463
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-09-05 05:12:50 +03:00 committed by tazjin
parent 41b6586ee1
commit f86327beac
2 changed files with 101 additions and 1 deletions

View file

@ -7,6 +7,10 @@ pub enum WarningKind {
UselessInherit,
UnusedBinding,
ShadowedGlobal(&'static str),
/// Tvix internal warning for features triggered by users that are
/// not actually implemented yet.
NotImplemented(&'static str),
}
#[derive(Debug)]