<div dir="ltr">I agree that the <font face="monospace">warn_untyped_record</font> warning does exactly what its name suggests.<br><br>However, when working with records without types, a different warning would be useful, something that could be called maybe <font face="monospace">warn_untyped_record_in_type</font> and what would give you a warning when a <font face="monospace">-type</font> or <font face="monospace">-spec</font> declaration contains a record without type specification for all of its fields.<br><br>For example:<br><div><font face="monospace" size="2">-record(foo, {a :: integer(), b}).</font></div><div><font face="monospace" size="2">-type a() :: #foo{b :: boolean()}. % this is OK, both fields of #foo have a type</font></div><div><font face="monospace" size="2">-type b() :: #foo{}.               % this is wrong, #foo.b has no explicit type</font></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">Daniel</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 7 Dec 2018 at 15:39 Kostis Sagonas <<a href="mailto:kostis@cs.ntua.gr">kostis@cs.ntua.gr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/7/18 3:06 PM, Boroska András wrote:<br>
> Sorry, I meant bug report on the _compiler_ (not on dialyzer).<br>
> <br>
> On Fri, Dec 7, 2018 at 3:04 PM Boroska András <<a href="mailto:andras.boroska@gmail.com" target="_blank">andras.boroska@gmail.com</a> <br>
> <mailto:<a href="mailto:andras.boroska@gmail.com" target="_blank">andras.boroska@gmail.com</a>>> wrote:<br>
> <br>
>     Hi,<br>
> <br>
>     When defining records the way Daniel suggests dialyzer seems to find<br>
>     problems with record field constraints better. I find it helpful and<br>
>     changed our record definitions everywhere.<br>
> <br>
>     On the other hand when 'warn_untyped_record' compiler option is<br>
>     turned on, it warns us that "record foo has field(s) without type<br>
>     information". (OTP-21.1.3) Shall I open a bug report/feature request<br>
>     on dialyzer?<br>
<br>
If, for whatever reason, you find that having records without types <br>
works better for your setting / code base, what's the reason why you <br>
also set the `warn_untyped_record' compiler option?<br>
<br>
It's off by default, isn't it?  (And its name explicitly suggests that <br>
it warns when you have record definitions without types, doesn't it?)<br>
<br>
Kostis<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>