[erlang-questions] internal error in lint_module
Mikhail Sobolev
mikhail.sobolev@REDACTED
Mon Dec 31 03:42:15 CET 2012
Hi,
Today I encountered a never seen error before :)
I spent about an hour to understand what's wrong and the problem
disappeared after fxing a typo.
A minimal example I managed to come out with is:
--- cut here ---
-module(p2).
-export([
manifest/2
]).
manifest(Module, Name) ->
fun Module:Nine/1.
--- cut here ---
While compiling with erlc, the following error message is produced:
--- cut here ---
p2.erl:none: internal error in lint_module;
crash reason: {{case_clause,{location,8}},
[{erl_lint,loc,1,[{file,"erl_lint.erl"},{line,598}]},
{erl_lint,add_error,3,[{file,"erl_lint.erl"},{line,588}]},
{erl_lint,expr_var,4,[{file,"erl_lint.erl"},{line,3155}]},
{erl_lint,'-expr_list/3-fun-0-',3,
[{file,"erl_lint.erl"},{line,2289}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1197}]},
{erl_lint,expr,3,[{file,"erl_lint.erl"},{line,2151}]},
{erl_lint,exprs,3,[{file,"erl_lint.erl"},{line,2047}]},
{erl_lint,clause,3,[{file,"erl_lint.erl"},{line,1399}]}]}
--- cut here ---
If the typo -- Nine -- is fixed, everything compiles just fine.
A brief look at the error message and erl_lint:598 suggest that
somehow the 'file' information anticipated in the case clauses is
missing.
Information about the erlang used:
Erlang R15B02 (erts-5.9.2) [source] [smp:2:2] [async-threads:0] [hipe]
[kernel-poll:false]
I'm running an Ubuntu 12.10, and the package is taken from
Debian/experimental (and rebuilt for my environment) :))
I wonder if it's a bug or something else.
--
Misha
More information about the erlang-questions
mailing list