Skip to content

No closing meta on empty qualified tuple #14682

@lukaszsamson

Description

@lukaszsamson

Elixir and Erlang/OTP versions

Erlang/OTP 27 [erts-15.2.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Elixir 1.18.4 (compiled with Erlang/OTP 27)

Operating system

any

Current behavior

closing meta present on Foo.{A}

iex(12)> Code.string_to_quoted!("Foo.{A}", unescape: false, token_metadata: true, literal_encoder: &{:ok, {:__block__, &2, [&1]}}, columns: true)
{{:., [line: 1, column: 4],
  [
    {:__aliases__,
     [last: [line: 1, column: 1], line: 1, column: 1], [:Foo]},
    :{}
  ]}, [closing: [line: 1, column: 7], line: 1, column: 4],
 [
   {:__aliases__,
    [last: [line: 1, column: 6], line: 1, column: 6], [:A]}
 ]}

Note no closing meta present on Foo.{}

iex(13)> Code.string_to_quoted!("Foo.{}", unescape: false, token_metadata: true, literal_encoder: &{:ok, {:__block__, &2, [&1]}}, columns: true)
{{:., [line: 1, column: 4],
  [
    {:__aliases__,
     [last: [line: 1, column: 1], line: 1, column: 1], [:Foo]},
    :{}
  ]}, [line: 1, column: 4], []}

Also the position of opening { is not recorded in meta.

Expected behavior

expected closing: [line: 1, column: 6]

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