You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @joaquimadraz, It's appear that the macro behave differently on matching operator. As @ssboisen suggest, you need to use parentheses in matching operator. Maybe someone more expert can explain why.
Hey @danielberkompas,
I was trying define a function that includes an argument that is being destructed like this:
And I got this error a compile error:
expected key-value pairs in a map, got: name
.After a while digging into the code, I found out that if I define a new macro:
..the compile error is gone.
I'm still trying to get my head around meta programming in Elixir and this is confusing for me.
Why is
destructure
handling other arguments?Thanks 😃
The text was updated successfully, but these errors were encountered: