We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-module(thingy). -export([x/0]). x() -> lists:foldl(fun (E, A) -> some_mod:xyz(E, A) end, [], [1, 2, 3]).
1> c(thingy),power_shell:eval(thingy,x,[]). ** exception error: undefined function lists:foldl/3 in function lists:foldl/3 in call from thingy:x/0
The text was updated successfully, but these errors were encountered:
This seems due to the way the anonymous function is being evaluated after being passed to a built-in function (in this case lists:foldl/3):
lists:foldl/3
-module(thiny). -export([x/0, y/0, z/0]). x() -> lists:foldl(fun (E, A) -> some_mod:xyz(E, A) end, [], [1, 2, 3]). y() -> some_mod:xyz(1, 2). z() -> (fun(E, A) -> some_mod:xyz(E, A) end)(1, 2).
1> catch power_shell:eval(thingy, x, []). {'EXIT',{undef,[{lists,foldl, [#Fun<power_shell_eval.43.115918300>,[],[1,2,3]], []}, {lists,foldl,3,[]}, {thingy,x,0,[]}, {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,689}]}, {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,434}]}, {shell,exprs,7,[{file,"shell.erl"},{line,686}]}, {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]}, {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}} 2> catch power_shell:eval(thingy, y, []). {'EXIT',{undef,[{some_mod,xyz,[1,2],[]}, {thingy,y,0,[]}, {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,689}]}, {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,434}]}, {shell,exprs,7,[{file,"shell.erl"},{line,686}]}, {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]}, {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}} 3> catch power_shell:eval(thingy, z, []). {'EXIT',{undef,[{some_mod,xyz,[1,2],[]}, {thingy,z,0,[]}, {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,689}]}, {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,434}]}, {shell,exprs,7,[{file,"shell.erl"},{line,686}]}, {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]}, {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}
Sorry, something went wrong.
[power_shell] fix missing stack frame for anomymous functions
c5da1dd
Fixes WhatsApp#2.
No branches or pull requests
The text was updated successfully, but these errors were encountered: