-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 issues with dialyzer infinite loop #7993
Conversation
true <- unquote(guard_date) do | ||
{year, month, day} = unquote(read_date) | ||
|
||
with {:ok, date} <- new(year, month, day, Calendar.ISO) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not squash it into single with
like:
with unquote(match_date) <- string,
true <- unquote(guard_date),
{year, month, day} = unquote(read_date),
{:ok, date} <- new(year, month, day, Calendar.ISO) do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they have different else
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, true
lib/elixir/lib/calendar/date.ex
Outdated
{:error, :invalid_format} | ||
[match_date, guard_date, read_date] = Calendar.ISO.__match_date__() | ||
|
||
def raw_from_iso8601(string, calendar) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a private function defp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
❤️ 💚 💙 💛 💜 |
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
Closes #7989