Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes incompatible types warning #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bmartin2015
Copy link

A quick fix to clear up the following warnings:

warning: incompatible types:

    %ExMarshal.Errors.EncodeError{} !~ atom()

in expression:

    # lib/ex_marshal/errors/encode_error.ex:5
    exception.reason()

where "exception" was given the type %ExMarshal.Errors.EncodeError{} in:

    # lib/ex_marshal/errors/encode_error.ex:4
    %ExMarshal.Errors.EncodeError{} = exception

where "exception" was given the type atom() (due to calling var.fun()) in:

    # lib/ex_marshal/errors/encode_error.ex:5
    exception.reason()

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/ex_marshal/errors/encode_error.ex:5: ExMarshal.Errors.EncodeError.message/1

warning: incompatible types:

    %ExMarshal.Errors.DecodeError{} !~ atom()

in expression:

    # lib/ex_marshal/errors/decode_error.ex:5
    exception.reason()

where "exception" was given the type %ExMarshal.Errors.DecodeError{} in:

    # lib/ex_marshal/errors/decode_error.ex:4
    %ExMarshal.Errors.DecodeError{} = exception

where "exception" was given the type atom() (due to calling var.fun()) in:

    # lib/ex_marshal/errors/decode_error.ex:5
    exception.reason()

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/ex_marshal/errors/decode_error.ex:5: ExMarshal.Errors.DecodeError.message/1

@bmartin2015
Copy link
Author

@gaynetdinov Any chance you could review this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant