Existing issue
Elixir and Erlang/OTP versions
Erlang/OTP 29 [erts-17.0.6] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Elixir 1.20.4 (compiled with Erlang/OTP 29)
Operating system
NixOS
Current behavior
Dynamic key variables are not allowed in a struct:
field = :path
%URI{field => "/"}
And always produce the following error:
error: invalid key field for struct, struct keys must be atoms, got:
└─ iex:1
** (CompileError) cannot compile code (errors have been logged)
Expected behavior
This here on the other hand just works:
field = :path
%{%URI{} | field => "/"}
Would be good if it worked directly.
Existing issue
Elixir and Erlang/OTP versions
Erlang/OTP 29 [erts-17.0.6] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Elixir 1.20.4 (compiled with Erlang/OTP 29)
Operating system
NixOS
Current behavior
Dynamic key variables are not allowed in a struct:
And always produce the following error:
Expected behavior
This here on the other hand just works:
Would be good if it worked directly.