This actually uses coercion under the hood in C++ Nix. See the test for an example. Change-Id: Id56b364acf269225b6829d0b600e0222f8b3608d Reviewed-on: https://cl.tvl.fyi/c/depot/+/8322 Reviewed-by: andi <andi@notmuch.email> Tested-by: BuildkiteCI
5 lines
107 B
Nix
5 lines
107 B
Nix
# builtins.substring uses string coercion internally
|
|
|
|
builtins.substring 0 2 {
|
|
__toString = _: "4200";
|
|
}
|