talentdeficit / jsx

an erlang application for consuming, producing and manipulating json. inspired by yajl
MIT License
695 stars 218 forks source link

Fix as per dialyzer warning #123

Closed paulo-ferraz-oliveira closed 4 years ago

paulo-ferraz-oliveira commented 5 years ago

I'm still missing a warning, though...

src/jsx_decoder.erl
 764: Guard test fun((atom() | binary() | [atom() | binary() | [any()] | number() | {} | {atom() | binary() | {non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},atom() | binary() | [any()] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | {byte(),byte(),byte()} | #{}} | #{}] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | #{},{'encoder',_,atom() | tuple()} | {'parser',_,atom() | tuple(),[any()]} | {'decoder',_,atom() | tuple(),'null' | [any()],[any()]},[atom() | {'error_handler',fun((atom() | binary() | [atom() | binary() | [any()] | number() | {} | {atom() | binary() | {non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},atom() | binary() | [any()] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | {byte(),byte(),byte()} | #{}} | #{}] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | #{},{'encoder',_,atom() | tuple()} | {'parser',_,atom() | tuple(),[any()]} | {'decoder',_,atom() | tuple(),'null' | [any()],[any()]},[atom() | {'error_handler',_} | {'incomplete_handler',_} | {'pre_encode',fun((_) -> any())}]) -> any())} | {'incomplete_handler',fun((atom() | binary() | [atom() | binary() | [any()] | number() | {} | {atom() | binary() | {non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},atom() | binary() | [any()] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | {byte(),byte(),byte()} | #{}} | #{}] | number() | {{non_neg_integer(),1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12,1..255},{byte(),byte(),byte()}} | #{},{'encoder',_,atom() | tuple()} | {'parser',_,atom() | tuple(),[any()]} | {'decoder',_,atom() | tuple(),'null' | [any()],[any()]},[atom() | {'error_handler',_} | {'incomplete_handler',_} | {'pre_encode',fun((_) -> any())}]) -> any())} | {'pre_encode',fun((_) -> any())}]) -> any()) =:= F::byte() can never succeed