[erlang-bugs] erl_eval funs

Fred Hebert <>
Sat Sep 7 17:55:57 CEST 2013


This is a 'problem' for all funs going in the shell and evaluator, and
they also hit escripts without a module name.

It's about a fun of that type being seen as a local one rather than an
auto-imported one, and so they get attached to erl_eval like other
evaluated funs. This works with any other auto-imported function in the
shell (say process_info/1-2).

I guess there needs to be an extension to the entire chain to fix this.

Regards,
Fred.

On 09/07, Tony Rogvall wrote:
> R16B01
> 
> The following code compile and works when in a module:
> 
> -module(m).
> -export([f/0]).
> 
> f() ->
> 	fun abs/1.
> 
> > (m:f())(-3).
> 3
> 
> But
> > > (fun abs/1)(-3).
> ** exception error: undefined function erl_eval:abs/1
> 
> 
> /Tony
> 

> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs



More information about the erlang-bugs mailing list