Error with debuger and fun's in Erlang R10B-8
Gunilla Arendt
gunilla@REDACTED
Thu Dec 1 15:03:08 CET 2005
Thanks, the bug is now fixed. The new version of Debugger will be part
of R10B-9, probably to be released in December.
/ Gunilla
Jakob Skipper wrote:
> % This code fails in Erlang R10B8 when debugger is running.
> %
> % Do the following:
> % * Compile this module
> % * Run "debugger_fun:test()", output is [yes,no,no,no]
> % * Start the debugger "debugger:start" and interpret this module; no
> breakpoints etc. necessary
> % * Run "debugger_fun:test()" again, output is now [no,no,no,no]
>
> -module(debugger_fun).
> -export([test/0]).
>
>
> n(N) ->
> lists:map(
> fun(X) when N==X ->
> yes;
> (_) ->
> no
> end,
> [1,2,3,4]
> ).
>
> test() ->
> n(1).
>
>
> If you replace the "when" clause in the fun with a case expression then
> it works fine.
>
> --
> Jakob Skipper
> Skipper ApS
> jakob@REDACTED
> +45 5192 4447
More information about the erlang-bugs
mailing list