Elixir and Erlang/OTP versions
Erlang/OTP 28 [erts-16.1] [source] [64-bit] [smp:14:14] [ds:14:14:10] [async-threads:1] [jit]
Elixir 1.19.0-rc.1 (f642b30) (compiled with Erlang/OTP 28)
Operating system
macos
Current behavior
defmodule Test do
defstruct(
my_regex: ~r/^hi$/
)
def init() do
%__MODULE__{}
end
end
IO.inspect(Test.init())
> elixir test.exs
error: undefined function __aliases__/1 (expected Test to define such a function or for it to be imported, but none are available)
└─ test.exs: Test.init/1
** (CompileError) test.exs: cannot compile module Test (errors have been logged)
Expected behavior
> elixir --version
Erlang/OTP 27 [erts-15.2.7] [source] [64-bit] [smp:14:14] [ds:14:14:10] [async-threads:1] [jit]
Elixir 1.18.4 (compiled with Erlang/OTP 27)
> elixir test.exs
%Test{my_regex: ~r/^hi$/}