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

fix: typespec in generated code #561

Merged

Conversation

ymtszw
Copy link
Contributor

@ymtszw ymtszw commented Nov 5, 2020

Hi. This is a small typespec fix.

@spec for deliver_now/2 when using Bamboo.Mailer defines tuple
for when we call it with response: true option.
However the slots in the tuple are misaligned from actual implementation,
causing dialyzer warning in our code.

Impl is:

      response = adapter.deliver(email, config)
      {email, response}

https://github.com/thoughtbot/bamboo/blob/8c5780319c5e2c936d04a2e1d9594be20a525c9b/lib/bamboo/mailer.ex#L149-L150

Copy link
Collaborator

@germsvel germsvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! 🔍 👀

@germsvel germsvel merged commit a479fd4 into beam-community:master Nov 5, 2020
@ymtszw ymtszw deleted the fix_typespec_in_generated_code branch November 5, 2020 13:52
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.

2 participants