new new in parameterized modules causes beam_dead

Mikael Karlsson karlsson.rm@REDACTED
Fri Mar 12 12:52:34 CET 2010


Hi,
I am trying to redefine the "new" function in a parameterized module
(ref. http://ftp.sunet.se/pub/lang/erlang/euc/07/papers/1700Carlsson.pdf)
,
but the compiler crashes with:

11> c(ewgi_req.erl).
Function new/1 refers to undefined label 15
./ewgi_req.erl:none: internal error in beam_dead;
crash reason: {{case_clause,{'EXIT',{undefined_label,15}}},
               [{compile,'-select_passes/2-anonymous-2-',2},
                {compile,'-internal_comp/4-anonymous-1-',2},
                {compile,fold_comp,3},
                {compile,internal_comp,4},
                {compile,internal,3}]}
error

Any ideas?

Workaround for now is to name the my "new" fun to "new1" and call the
default "new" from this one.

Cheers
Mikael


More information about the erlang-questions mailing list