ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 120 forks source link

Cannot recognize variables defined in case..of #982

Open ygb8745 opened 2 years ago

ygb8745 commented 2 years ago

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