Error with debuger and fun's in Erlang R10B-8
Jakob Skipper
jakob@REDACTED
Mon Nov 28 10:15:52 CET 2005
% 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20051128/1ccf126e/attachment.htm>
More information about the erlang-bugs
mailing list