[erlang-questions] Wrong compilation warning

Kostis Sagonas <>
Wed Feb 6 21:29:25 CET 2008


Maxim Treskin wrote:
>>... 
> -record(core_state, {
>           ctx_ids = [] :: [#ctx_ids{}],
>           contexts = [] :: [#context{}]
>          }).
> 
> I see a warning:
> Warning: record context is unused
> 
> Record #context is unused in code, except in definition of record 
> #core_state. May be is it compilation bug?

Well, a superfluous warning, even if bogus, is clearly not a compilation 
  bug. In your code the culprit is the linter (erl_lint) that has not 
been adapted to take into account type annotations in record declarations.
This might happen soon -- possibly even in the next R12 release.

Best,
Kostis



More information about the erlang-questions mailing list