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

Make position of return type in specs consistent #47

Closed
michalmuskala opened this issue Jul 7, 2020 · 0 comments · Fixed by #51
Closed

Make position of return type in specs consistent #47

michalmuskala opened this issue Jul 7, 2020 · 0 comments · Fixed by #51
Labels
bug Something isn't working

Comments

@michalmuskala
Copy link
Member

It appears we have an inconsistency in how we format specs between when they have guards/variables and when they don't when the arguments portion is split over multiple lines.

The case without when is formatted as:

-spec my_fun(
  one :: one_type(),
  two :: two_type()
) -> 
    return_type().

The case with when is formatted as:

-spec my_fun(
  one :: One,
  two :: two_type()
) -> return_type() when
    One :: one_type().

Notice how the return type is in one case allowed to be on the same like as -> and is not allowed in the other, even if it would fit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant