We were running Dialyzer on our project and ran into some issues with this type definition being for the module rather than the struct. Once we made this change, Dialyzer stopped complaining about the types not matching.
Dialyzer output this resolves:
lib/mail/parsers/rfc_2822.ex:19:invalid_contract
The @spec for the function does not match the success typing of the function.
Function:
Mail.Parsers.RFC2822.parse/1
Success typing:
@spec parse(binary() | nonempty_maybe_improper_list()) :: %Mail.Message{
:body => nil | binary(),
:headers => map(),
:multipart => boolean(),
:parts => [any()]
}
We were running Dialyzer on our project and ran into some issues with this type definition being for the module rather than the struct. Once we made this change, Dialyzer stopped complaining about the types not matching.
Dialyzer output this resolves:
Closes # .
Changes proposed in this pull request