Open dcopso opened 1 year ago
This has also been raised in the discussion forum: https://groups.google.com/g/jsonnet/c/RoJIt5vlwX4
This is sugar for object coming right after any other expression, it desugars to a + b
Relevant part of the specification: $desugar{expr}(e { objinside }, b) = desugar{expr}(e + { objinside }, b)$
I'm new to jsonnet and I'm loving it but I see a behavior that I'm surprised by: the + between object literals seems to be optional, but only on object literals:
This program is valid:
This program is not:
Changing
left right
toleft + right
makes the program valid.This suggests that variables are not transparent in the same way that functions are. Is this expected?
Also, what is going on with
{a:1} {b:1}
? Why is that, and expressions such as{}{}
, valid?Thanks!