diff options
Diffstat (limited to 'test/testdata/eval-okay-foldlStrict-lazy-elements.nix')
-rw-r--r-- | test/testdata/eval-okay-foldlStrict-lazy-elements.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-foldlStrict-lazy-elements.nix b/test/testdata/eval-okay-foldlStrict-lazy-elements.nix new file mode 100644 index 0000000..c666e07 --- /dev/null +++ b/test/testdata/eval-okay-foldlStrict-lazy-elements.nix | |||
@@ -0,0 +1,9 @@ | |||
1 | # Tests that the rhs argument of op is not forced unconditionally | ||
2 | let | ||
3 | lst = builtins.foldl' | ||
4 | (acc: x: acc ++ [ x ]) | ||
5 | [ ] | ||
6 | [ 42 (throw "this shouldn't be evaluated") ]; | ||
7 | in | ||
8 | |||
9 | builtins.head lst | ||