diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2014-02-19 12:45:15 +0100 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2014-02-19 12:45:15 +0100 |
commit | 933834aedd38970db9227534a037269df2b8f8a0 (patch) | |
tree | 051e158893326d6719319cbf7b6933ffe17ff889 /lib/elixir/src/elixir_fn.erl | |
parent | 013303a44ef4a3e64666c4abf042fc126e41cf7f (diff) | |
download | elixir-933834aedd38970db9227534a037269df2b8f8a0.tar.gz |
Add try/case/receive to list of constructs that can handle returns
Diffstat (limited to 'lib/elixir/src/elixir_fn.erl')
-rw-r--r-- | lib/elixir/src/elixir_fn.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/elixir/src/elixir_fn.erl b/lib/elixir/src/elixir_fn.erl index 38a5b1431..934f1513f 100644 --- a/lib/elixir/src/elixir_fn.erl +++ b/lib/elixir/src/elixir_fn.erl @@ -6,7 +6,8 @@ translate(Meta, Clauses, S) -> Transformer = fun({ '->', CMeta, [ArgsWithGuards, Expr] }, Acc) -> { Args, Guards } = elixir_clauses:extract_splat_guards(ArgsWithGuards), - { TClause, TS } = elixir_clauses:clause(?line(CMeta), fun translate_fn_match/2, Args, Expr, Guards, Acc), + { TClause, TS } = elixir_clauses:clause(?line(CMeta), fun translate_fn_match/2, + Args, Expr, Guards, true, Acc), { TClause, elixir_scope:mergef(S, TS) } end, |