coerce stringy booleans

This commit is contained in:
Jarvis Carroll 2025-09-23 12:44:20 +10:00
parent 7704d82c6f
commit 0caf5a61c7

View File

@ -1822,8 +1822,12 @@ coerce({_, _, signature}, Bin, from_fate) ->
{ok, unicode:characters_to_list(Address)};
coerce({_, _, boolean}, true, _) ->
{ok, true};
coerce({_, _, boolean}, "true", _) ->
{ok, true};
coerce({_, _, boolean}, false, _) ->
{ok, false};
coerce({_, _, boolean}, "false", _) ->
{ok, false};
coerce({O, N, boolean}, S, _) ->
single_error({invalid, O, N, S});
coerce({O, N, string}, Str, Direction) ->