<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 28, 2018, at 5:04 AM, Kristóf Umann <<a href="mailto:dkszelethus@gmail.com" class="">dkszelethus@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><br class=""><span style="font-family:monospace,monospace" class=""><font face="arial,helvetica,sans-serif" class="">>></font></span> * We could find the discriminators using name conventions just as Kristóf mentioned<span class="gmail-m_-1231614449620449432m_2030617978285504101gmail-im"></span><br class=""></div></div></div></blockquote><div><br class=""></div><div>I think that’s a good idea, and we could not warn if the class has fields called mode/kind/type/etc.</div><div><br class=""></div><div>Another hack I was thinking about:</div><div><br class=""></div><div> - Check *syntactically* whether there is an *unguarded* access to uninitialized fields in equality/assignment/destructor operators.</div><div>Or maybe unguarded access in general.</div><div>This is checkable syntactically and provides a fairly strong indicator of a bug.</div><div><br class=""></div><div>I wish we had dataflow for that, but we don’t =/</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><span class="gmail-m_-1231614449620449432m_2030617978285504101gmail-im"></span><div class="gmail-m_-1231614449620449432m_2030617978285504101gmail-adL"><span class="gmail-m_-1231614449620449432m_2030617978285504101gmail-im">>> * Suppress reports from classes with most of their 
fields being uninitialized. This is a threshold kind of thing that is 
unpopular to some since some could could bounce back and forth around 
the threshold.<br class=""></span></div></div></div></div></blockquote><div><br class=""></div><div>I don’t think this will work well.</div><div>It also provides a very counter-intuitive behavior, as you have mentioned.</div></div></body></html>