-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Milestone
Description
Environment
OTP 21.2
Elixir 1.7.3
defmodule Test do
def handle_ms(ms) do
Map.put(ms, 5, 5)
end
def test() do
ms = %{}
ms_new = cond do
true ->
ms = Map.put(ms, :wtf, 5)
handle_ms(ms)
end
{ms, ms_new}
end
end
1> Test.test
{%{wtf: 5}, %{5 => 5, :wtf => 5}}Its clear the evaluation of this is incorrect and should be {%{}, %{5 => 5, :wtf => 5}}