about summary refs log tree commit diff
path: root/third_party/nix/tests/lang/eval-okay-with.nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/tests/lang/eval-okay-with.nix')
-rw-r--r--third_party/nix/tests/lang/eval-okay-with.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/third_party/nix/tests/lang/eval-okay-with.nix b/third_party/nix/tests/lang/eval-okay-with.nix
new file mode 100644
index 000000000000..033e8d3aba57
--- /dev/null
+++ b/third_party/nix/tests/lang/eval-okay-with.nix
@@ -0,0 +1,19 @@
+let {
+
+  a = "xyzzy";
+
+  as = {
+    a = "foo";
+    b = "bar";
+  };
+
+  bs = {
+    a = "bar";
+  };
+
+  x = with as; a + b;
+
+  y = with as; with bs; a + b;
+
+  body = x + y;
+}