about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/lang/eval-fail-scope-5.nix10
-rw-r--r--tests/lang/eval-okay-scope-4.exp1
-rw-r--r--tests/lang/eval-okay-scope-4.nix10
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/lang/eval-fail-scope-5.nix b/tests/lang/eval-fail-scope-5.nix
new file mode 100644
index 000000000000..dc8243bc8546
--- /dev/null
+++ b/tests/lang/eval-fail-scope-5.nix
@@ -0,0 +1,10 @@
+let {
+
+  x = "a";
+  y = "b";
+
+  f = {x ? y, y ? x}: x + y;
+
+  body = f {x = "c";} + f {y = "d";};
+
+}
diff --git a/tests/lang/eval-okay-scope-4.exp b/tests/lang/eval-okay-scope-4.exp
new file mode 100644
index 000000000000..e2c962c9588a
--- /dev/null
+++ b/tests/lang/eval-okay-scope-4.exp
@@ -0,0 +1 @@
+Str("ccdd")
diff --git a/tests/lang/eval-okay-scope-4.nix b/tests/lang/eval-okay-scope-4.nix
new file mode 100644
index 000000000000..dc8243bc8546
--- /dev/null
+++ b/tests/lang/eval-okay-scope-4.nix
@@ -0,0 +1,10 @@
+let {
+
+  x = "a";
+  y = "b";
+
+  f = {x ? y, y ? x}: x + y;
+
+  body = f {x = "c";} + f {y = "d";};
+
+}