Skip to content

Commit

Permalink
REWORD Fix expand_call (report issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Bärenz committed Feb 24, 2021
1 parent 25f6804 commit a1833a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ex_type/parser.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ defmodule ExType.Parser do
require ExType.Helper

def expand_call({:when, _, [{name, _, args}, guard]}) do
{name, args, guard}
{name, args || [], guard}
end

def expand_call({name, _, args}) do
# `true` guard is the same as no guard
{name, args, true}
{name, args || [], true}
end

# return {name, args, guard, block}
Expand Down

0 comments on commit a1833a2

Please sign in to comment.