not very informative compiler error message:

Bengt Kleberg eleberg@REDACTED
Wed Apr 30 09:12:22 CEST 2003


when compiling the test program below I get the error message:

/home/eleberg/test.erl:none: internal error in expand_module;
crash reason: {function_clause,[{dict,fetch_val,[a_record,[]]},
                                {sys_pre_expand,record_test,5},
                                {sys_pre_expand,expr,3},
                                {sys_pre_expand,guard_tests,3},
                                {sys_pre_expand,guard,3},
                                {sys_pre_expand,clauses,2},
                                {sys_pre_expand,function,5},
                                {sys_pre_expand,forms,2}|
                                more]}
/home/eleberg/test.erl:5: Warning: function a/1 is unused


i much prefer the error message:

/home/eleberg/test.erl:3: record a_record undefined

which i get with only 1 is_record() (ie, no ''or'' clause in the guard)


bengt
-------------- next part --------------
-module(test).

a( B ) when is_record( B, a_record) ->
	ok.


More information about the erlang-bugs mailing list