inaka / elvis

Erlang Style Reviewer
Apache License 2.0
426 stars 87 forks source link

elvis does not recognize latest maps comprehension #576

Open arodionov53 opened 11 months ago

arodionov53 commented 11 months ago

Code:

-module(dg1).

-export([smh/1]).

-spec smh(map()) -> [tuple()].
smh(Map) ->
    [{B, A} || A := B <- Map].

Error:

Error: {unhandled_abstract_form,
                           {m_generate,
                               [{text,"<-"},{location,{7,23}}],
                               {map_field_exact,
                                   [{text,":="},{location,{7,18}}],
                                   {var,[{text,"A"},{location,{7,16}}],'A'},
                                   {var,[{text,"B"},{location,{7,21}}],'B'}},
                               {var,[{text,"Map"},{location,{7,26}}],'Map'}}}```
elvis version:

{project_plugins, [ {rebar3_lint, "3.1.0"} []}.]