Skip to content

Macro.escape/2 doesn't honor :unquote option inside maps on 1.19rc #14829

@sabiwara

Description

@sabiwara

Elixir and Erlang/OTP versions

Erlang/OTP 28 [erts-16.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.19.0-rc.2 (957f84b) (compiled with Erlang/OTP 28)

Operating system

MacOS

Current behavior

iex> Macro.escape(%{field: {:unquote, [], [:test]}}, unquote: true)
{:%{}, [], [field: {:{}, [], [:unquote, [], [:test]]}]}

Expected behavior

Like in 1.18:

iex> Macro.escape(%{field: {:unquote, [], [:test]}}, unquote: true)
{:%{}, [], [field: :test]}

Originally reported here: https://elixirforum.com/t/macro-escape-2-unquote-option-behaviour-in-elixir-1-19/72859

Regression introduced by #14773

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions