Skip to content

Imperative Assignements are breaking the application in 1.7 update #8076

@jfayad

Description

@jfayad

Environment

  • Elixir & Erlang/OTP versions (elixir --version): Erlang/OTP 21 [erts-10.0] [ source] [64-bit]
    Elixir 1.7.0 (Compiled with Erlang/OTP 20)
  • Operating system: Ubuntu 16.04

Current behavior

After updated Elixir from 1.6 to 1.7 the params variable will always be equal to %{} outside the if statements

params = %{}

        if Map.has_key?(entities, "email") do
          params = Map.put_new(params, :email, get_values(entities["email"]))
        end

Expected behavior

The params variable should be correctly assigned for now and updating to 1.7 shouldn't break such a code since nothing has been mentioned in the release not of 1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions