On 06/02/2008, <b class="gmail_sendername">Kostis Sagonas</b> <<a href="mailto:kostis@cs.ntua.gr">kostis@cs.ntua.gr</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Maxim Treskin wrote:<br>>>...<br>> -record(core_state, {<br>> ctx_ids = [] :: [#ctx_ids{}],<br>> contexts = [] :: [#context{}]<br>> }).<br>><br>> I see a warning:<br>> Warning: record context is unused<br>
><br>> Record #context is unused in code, except in definition of record<br>> #core_state. May be is it compilation bug?<br><br>Well, a superfluous warning, even if bogus, is clearly not a compilation<br> bug. In your code the culprit is the linter (erl_lint) that has not<br>
been adapted to take into account type annotations in record declarations.<br>This might happen soon -- possibly even in the next R12 release.</blockquote><div><br>No, the warning is absolutely correct, the record context has not been used. All the type declaration says is that a record of type context *could* be used, but until you actually create a record of type context then it hasn't been used. Semantic "hair-splitting" it maybe, but still ... :-)<br>
<br>I'm just waiting (NOT) for day we see a compiler error "missing type declaration". :-)<br><br>Robert<br><br></div></div>