exercism / elixir-analyzer

GNU Affero General Public License v3.0
30 stars 32 forks source link

`assert_call` recognizes captured function for direct and indirect calls #212

Closed jiegillet closed 2 years ago

jiegillet commented 2 years ago

208 introduced a bug: since captured functions function/1 are transformed to {:/, _, [{:function, [], Elixir}, 2]} they looked like a variable and were therefore not considered. We didn't have any tests for this case.

This PR fixes that, both recognizing the target function in captured notation, or indirectly via helper functions in captured notations.