-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Elixir and Erlang/OTP versions
first noticed in elixir 1.17 but reproduced in most recent build too:
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.0 (8d216b8) (compiled with Erlang/OTP 26)
Operating system
MacOS 15.6.1
Current behavior
mix compile
Compiling 1 file (.ex)
error: def transact/2 defines defaults multiple times. Elixir allows defaults to be declared once per definition. Instead of:
def foo(:first_clause, b \\ :default) do ... end
def foo(:second_clause, b \\ :default) do ... end
one should write:
def foo(a, b \\ :default)
def foo(:first_clause, b) do ... end
def foo(:second_clause, b) do ... end
│
11 │ def transact(fun, opts \\ []) do
│ ^
│
└─ lib/reprod.ex:11:7
== Compilation error in file lib/reprod.ex ==
** (CompileError) lib/reprod.ex: cannot compile file (errors have been logged)
lib/reprod.ex:11: (module)
I made a project to reproduce the issue: https://github.com/kmc-firework/reprod
Expected behavior
should compile
Metadata
Metadata
Assignees
Labels
No labels