Is there some technique for making the code below work?


--Ian



defmodule Module.concat(["Foo"]) do

  defstruct name: nil, age: 5


  def whostruct do

    %__MODULE__{}

  end

end



** (CompileError) tmp/src.exs:5: Foo.__struct__/0 is undefined, cannot 
expand struct Foo

    (elixir) src/elixir_map.erl:44: :elixir_map.translate_struct/4

    (elixir) src/elixir_clauses.erl:36: :elixir_clauses.clause/7

    (elixir) src/elixir_def.erl:195: :elixir_def.translate_clause/7

    (elixir) src/elixir_def.erl:184: :elixir_def.translate_definition/8

    (elixir) src/elixir_def.erl:95: :elixir_def.store_definition/9

    (elixir) src/elixir.erl:175: :elixir.erl_eval/3

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/2b3d073f-7a12-4b93-8db5-35ca1f241340%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to