[erlang-bugs] Erlang R16B01: fun syntax and exception error: no case clause matching {location, 1} in function erl_lint:loc/1 (erl_lint.erl, line 577)

Anthony Ramine n.oxyde@REDACTED
Mon Sep 9 14:41:11 CEST 2013


Hello Joseph,

This is already fixed in upstream/maint:

2> [ fun x:C/0 || A <- [b] ].
* 1: variable 'C' is unbound

Regards,

Le 8 sept. 2013 à 17:43, Joseph Wayne Norton a écrit :

> 
> Hello.
> 
> I accidentally stumbled upon the crash below with erl_lint:loc/1.  I also noticed similar behavior with erlc when compiling a module with this same issue.
> 
> I'm unsure of the expected behavior.
> 
> Best regards,
> 
> Joe N.
> 
> 
> $ erl
> Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
> 
> Eshell V5.10.2  (abort with ^G)
> 1> [ fun x:A/0 || A <- [b] ].
> [#Fun<x.b.0>]
> 2> [ fun x:C/0 || A <- [b] ].
> ** exception error: no case clause matching {location,1}
>     in function  erl_lint:loc/1 (erl_lint.erl, line 577)
>     in call from erl_lint:add_error/3 (erl_lint.erl, line 567)
>     in call from erl_lint:expr_var/4 (erl_lint.erl, line 3049)
>     in call from erl_lint:'-expr_list/3-fun-0-'/3 (erl_lint.erl, line 2154)
>     in call from lists:foldl/3 (lists.erl, line 1248)
>     in call from erl_lint:expr/3 (erl_lint.erl, line 2031)
>     in call from erl_lint:handle_comprehension/4 (erl_lint.erl, line 2850)
>     in call from erl_lint:expr/3 (erl_lint.erl, line 1957)
> 3> 
> 
> 
> 3> [ fun x:A/0 || A <- [a] ].
> [#Fun<x.a.0>]
> 4> [ fun x:L/0 || A <- [a] ].
> ** exception error: no case clause matching {location,1}
>     in function  erl_lint:loc/1 (erl_lint.erl, line 577)
>     in call from erl_lint:add_error/3 (erl_lint.erl, line 567)
>     in call from erl_lint:expr_var/4 (erl_lint.erl, line 3049)
>     in call from erl_lint:'-expr_list/3-fun-0-'/3 (erl_lint.erl, line 2154)
>     in call from lists:foldl/3 (lists.erl, line 1248)
>     in call from erl_lint:expr/3 (erl_lint.erl, line 2031)
>     in call from erl_lint:handle_comprehension/4 (erl_lint.erl, line 2850)
>     in call from erl_lint:expr/3 (erl_lint.erl, line 1957)
> 
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list