elixir-xml_rpc
elixir-xml_rpc copied to clipboard
Wrong type for XMLRPC.Fault faut_code causes dialyzer warning
The following code
case XMLRPC.decode!(body) do
%XMLRPC.Fault{fault_code: 2} -> IO.inspect("fault 2")
end
makes dialyzer complain:
The pattern can never match the type.
Pattern:
%XMLRPC.Fault{:fault_code => 2}
Type:
%{
:__struct__ => XMLRPC.Fault | XMLRPC.MethodCall | XMLRPC.MethodResponse,
:fault_code => Integer,
:fault_string => binary(),
:method_name => binary(),
:param =>
false
| nil
| true
| binary()
| [false | nil | true | binary() | number()]
| number()
| map(),
:params => [
false
| nil
| true
| binary()
| [false | nil | true | binary() | number()]
| number()
| map()
]
}
The type is defined as:
@type t :: %__MODULE__{fault_code: Integer, fault_string: String.t}
I suppose it should be integer
instead of Integer