erl_eval:expr/5 oddity
Leo Liu <[email protected]> Fri, 08 Jul 2016 23:26:00 +0800
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <[email protected]> |
Assume X is
{'if',1,
[{clause,1,[],
[[{op,1,'=:=',{var,1,'Filters'},{nil,1}}]],
[{atom,1,true}]},
{clause,1,[],[[{atom,1,true}]],[{atom,1,false}]}]}
which is the abstract format for
if Filters =:= [] -> true; true -> false end.
1> erl_eval:expr(X, [], none, none, none).
=> false
2) erl_eval:expr(X, [])
=> ** exception error: {unbound_var,'Filters'}
bug?
Leo
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs