jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.69k stars 141 forks source link

Failed to format warning #480

Open nikitosing opened 1 year ago

nikitosing commented 1 year ago

Precheck

Environment

Current behavior

Please file a bug in https://github.com/jeremyjh/dialyxir/issues with this message.

Failed to format warning:
"@spec a(String.t(), %{:method_id => String.t(), :args => nil}, atom(), true | false, ['api?'()]) :: [%{}]\ndef a() do\n  :ok\nend\n"

Legacy warning:
lib/explorer/smart_contract/reader.ex:370: The call 'Elixir.Explorer.SmartContract.Reader':query_function(_contract_address_hash@1::any(),#{'args':=_, 'method_id':=_},_type@1::any(),_from@1::any(),'true') will never return since the success typing is (#{'__struct__':='Elixir.Explorer.Chain.Hash', 'byte_count':=20, 'bytes':=<<_:160>>},#{'args':='nil' | [any()], 'method_id':=binary(), _=>_},atom(),boolean(),[{'api?',boolean()}]) -> [#{}] and the contract is ('Elixir.String':t(),#{'method_id':='Elixir.String':t(),'args':='nil'},atom(),'true' | 'false',['api?'()]) -> [#{}]
    ; ('Elixir.Explorer.Chain.Hash':t(),#{'method_id':='Elixir.String':t(),'args':=[term()]},atom(),'true' | 'false',['api?'()]) -> [#{}]