Invalid quoted expression

652 views
Skip to first unread message

Alexei Sholik

unread,
Apr 27, 2014, 9:49:26 PM4/27/14
to elixir-lang-ta.
What is invalid about this expression?

** (CompileError) lib/beamie/views/play_view.ex: invalid quoted expression: Beamie.Helpers.Template[id: "output", name: "", text: "<div class=\"{{class}}\">\n  <span class=\"label label-default\">{{tag}}</span>\n  <pre class=\"codeOutput\"></pre>\n</div>\n"]
    (elixir) src/elixir_exp.erl:416: :elixir_exp.expand_arg/2
    (stdlib) lists.erl:1352: :lists.mapfoldl/3
    (elixir) src/elixir_exp.erl:389: :elixir_exp.expand_list/4
    (elixir) src/elixir_exp.erl:366: :elixir_exp.expand/2
    (elixir) src/elixir_exp_clauses.erl:15: :elixir_exp_clauses.def/5
    (elixir) src/elixir_def.erl:158: :elixir_def.translate_definition/8
    (elixir) src/elixir_def.erl:89: :elixir_def.store_definition/9

--
Best regards
Alexei Sholik

José Valim

unread,
Apr 28, 2014, 1:06:27 AM4/28/14
to elixir-l...@googlegroups.com
Not all values are valid quoted expressions. For example, an anonymous function is not a valid quoted expressions. Tuples with a number of elements different than 2 are not quoted expressions too. They don't represent code, they represent data, and some of them in a way that cannot be converted to code.



José Valim
Skype: jv.ptec
Founder and Lead Developer


--
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-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Han

unread,
Jul 24, 2016, 10:28:09 AM7/24/16
to elixir-lang-talk, jose....@plataformatec.com.br
I met this problem just now. How about adding this to doc of unquote?
Reply all
Reply to author
Forward
0 new messages