D
defmodule Outer.Struct doБез
alias Outer.Struct
defstruct name: nil
def init(params) do
state = %Struct{
name: params
}
end
end
alias Outer.Struct ошибка компиляции Struct.__struct__/1 is undefined, cannot expand struct Struct. Make sure the struct name is correct. If the struct name exists and is correct but it still cannot be found, you likely have cyclic module usage in your codedefmodule Outer.Struct do
alias __MODULE__
defstruct name: nil
def init(params), do: %Struct{name: params} ...
end


