toString also coerces a set with an outPath attribute to a string

nix-repl> builtins.toString { outPath = "somestring"; }
"somestring"
This commit is contained in:
Niels Egberts 2021-07-09 21:50:10 +01:00
parent 9cf991f421
commit ae0ed53b09

View file

@ -3109,7 +3109,7 @@ static RegisterPrimOp primop_toString({
- A path (e.g., `toString /foo/bar` yields `"/foo/bar"`.
- A set containing `{ __toString = self: ...; }`.
- A set containing `{ __toString = self: ...; }` or `{ outPath = ...; }`.
- An integer.