about summary refs log tree commit diff
path: root/tests/lang/eval-okay-tojson.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-10-27T09·15+0100
committerEelco Dolstra <edolstra@gmail.com>2020-01-04T13·10+0100
commit3130aafd0145c5c07f4557fe37f0c4d367e2d4f1 (patch)
treee3a4d542172a258b6926e454251752fac46ae4d7 /tests/lang/eval-okay-tojson.nix
parent6c90e3b9ac7c99d2ec4366363e99b9740470e41c (diff)
builtins.toJSON: fix __toString usage
(cherry picked from commit e583df52800b4baa1564b027fe3b83a21756c2cc)
Diffstat (limited to 'tests/lang/eval-okay-tojson.nix')
-rw-r--r--tests/lang/eval-okay-tojson.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-tojson.nix b/tests/lang/eval-okay-tojson.nix
index c046ba4ae59b..ce67943bead5 100644
--- a/tests/lang/eval-okay-tojson.nix
+++ b/tests/lang/eval-okay-tojson.nix
@@ -9,4 +9,5 @@ builtins.toJSON
     h = [ "a" [ "b" { "foo\nbar" = {}; } ] ];
     i = 1 + 2;
     j = 1.44;
+    k = { __toString = self: self.a; a = "foo"; };
   }