bug
Joe Armstrong
erlang@REDACTED
Wed Jan 5 15:49:33 CET 2011
-module(ecc_pass1).
-record('FUNCTION',
{
compound_statement %% function body
}).
-export([start/2]).
%% returns #Pass1 or throws an error
start(File, ParseTree) ->
Fs = [I || I <- ParseTree, is_function(I)].
is_function(X) -> is_record(X, 'FUNCTION').
Compiling this crashes the compiler
~/code/c_compiler/report_this_bug$ erlc ecc_pass1.erl
Function: start/2
./ecc_pass1.erl:none: internal error in kernel_module;
crash reason: {function_clause,
[{v3_kernel,lit_vars,
[{k_call,
[11,{file,"./ecc_pass1.erl"}],
{k_local,
[11,{file,"./ecc_pass1.erl"}],
is_function,1},
[{k_var,[11,{file,"./ecc_pass1.erl"}],ker11}],
[]}]},
{v3_kernel,uguard_expr,3},
{v3_kernel,uguard_expr,3},
{v3_kernel,uguard,2},
{v3_kernel,umatch,3},
{v3_kernel,'-umatch_list/3-anonymous-0-',3},
{v3_kernel,umatch,3},
{v3_kernel,umatch,3}]}
./ecc_pass1.erl:16: Warning: function is_function/1 is unused
/Joe
More information about the erlang-bugs
mailing list