aboutsummaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-24 15:18:18 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-01-24 15:18:18 +0100
commitbed8270c0cbaa3007621ad2f0e722abcefe79702 (patch)
tree04e92115eed32340914d982407ce37f178748210 /tests/lang
parentc4fc9b6a8d4fa279206814295729985dac7bc509 (diff)
Fix parsing of variable names that are a prefix of '__curPos'
Fixes $ nix-instantiate --parse -E 'x: with x; _' (x: (with x; __curPos))
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/eval-okay-regression-20220122.exp1
-rw-r--r--tests/lang/eval-okay-regression-20220122.nix1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-regression-20220122.exp b/tests/lang/eval-okay-regression-20220122.exp
new file mode 100644
index 000000000..00750edc0
--- /dev/null
+++ b/tests/lang/eval-okay-regression-20220122.exp
@@ -0,0 +1 @@
+3
diff --git a/tests/lang/eval-okay-regression-20220122.nix b/tests/lang/eval-okay-regression-20220122.nix
new file mode 100644
index 000000000..694e9a13b
--- /dev/null
+++ b/tests/lang/eval-okay-regression-20220122.nix
@@ -0,0 +1 @@
+((_: _) 1) + ((__: __) 2)