arjan / decorator

Function decorators for Elixir
MIT License
385 stars 20 forks source link

Not working correctly when used for function with different arities #21

Closed ludwikbukowski closed 6 years ago

ludwikbukowski commented 6 years ago

Example:

  @decorate function_result(:ok)
  def testfun(a,b) do a + b end
  @decorate function_result(:ok)
  def testfun(a) do a end

Will compile with a warning:

warning: this clause cannot match because a previous clause at line XX always matches

Example test: https://github.com/arjan/decorator/pull/20

ludwikbukowski commented 6 years ago

It has been fixed in #20

arjan commented 6 years ago

Merged, thanks!