Skip to content

Syntax error with -> #11209

@hissssst

Description

@hissssst

Environment

$ uname -a
Linux 5.13.11 #1-NixOS SMP Sun Aug 15 12:01:57 UTC 2021 x86_64 GNU/Linux

$ elixir --version
Erlang/OTP 24 [erts-12.0.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

Current behavior

See https://elixirforum.com/t/does-this-worth-an-issue/41897/4 for examples

The main problem here is that

f(1 -> 2)

results in a syntax error

But something like

(1 -> 2) |> f()
# or
f((1 -> 2))

Is a valid expression

Expected behavior

f(1 -> 2)

Does not result in syntax error

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