about summary refs log tree commit diff
path: root/tvix/eval/src/errors.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-04T22·35+0300
committertazjin <tazjin@tvl.su>2022-09-10T21·57+0000
commit4e06e5d2baf99de503decfb3cc92240baf455ee4 (patch)
tree565eeafbfb963bc363d713ad0834c4545e2e8fc4 /tvix/eval/src/errors.rs
parent06909f182151cf2332a14909e8b772ab4648854e (diff)
fix(tvix/eval): reintroduce 'InvalidAttribuetName' error variant r/4787
As pointed out by sterni in cl/6205, this is actually possible in
syntactically valid expressions like

  { ${12 + 13} = 12; }

Change-Id: Id8a1e3aceb551f288f9050c4eea563eb6572f1a7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6461
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/errors.rs')
-rw-r--r--tvix/eval/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index 2b8ba8f963..ad4acd479e 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -6,6 +6,12 @@ pub enum ErrorKind {
         key: String,
     },
 
+    /// Attempted to specify an invalid key type (e.g. integer) in a
+    /// dynamic attribute name.
+    InvalidAttributeName {
+        given: &'static str,
+    },
+
     AttributeNotFound {
         name: String,
     },