ignatov/intellij-erlang

Cannot recognize variables defined in case..of

ygb8745 opened this issue · 0 comments

Code like:

handle_call(_Request, _From, State) ->
    case VarB = fun_b() of
        a -> a;
        _ -> VarB
    end,
    {reply, ok, State}.

fun_b()->
    b.

The plugin will notify that the first VarB is unused and the second VarB is unbound.
unused var Snipaste_2022-07-19
unbound_var Snipaste_2022-07-19

--
Environment info:
IntelliJ IDEA version: IntelliJ IDEA 2022.1.4
Erlang plugin version: 0.11.1142