<div dir="ltr">I am running R12B-4 and have generated code with Lisp Flavoured Erlang.<br><br>There is a bug in eval_element/3 which is called from fold_call/4 which tries to safely evaluate calls at compile time. Eval_element tries to evaluate calls to element/2. It also tries to check if the call is guaranteed to fail in which case it replaces the original call with a call to erlang:error(badarg). It is this check which is causing the bug as it is so tuned to code generated by the vanilla erlang compiler that it does not accept a nested call in the element. This is the bug.<br>
<br>I would also argue that such a substitution has very little noticeable effect as any evaluation of the arguments to element/2 have been broken out and will already be evaluated before the code ever reaches the erlang:error call. It, in fact, saves very little.<br>
<br>Robert<br><br></div>