<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>DereferenceRule (infer.Nullsafe.DereferenceRule)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">Nullsafe</a>» DereferenceRule</nav><h1>Module <code>Nullsafe.DereferenceRule</code></h1></header><aside><p>Dereference rule should be checked every type an object is dereferenced. The rule checks if the reference is nullable.</p></aside><dl><dtclass="spec type"id="type-violation"><ahref="#type-violation"class="anchor"></a><code><spanclass="keyword">type</span> violation</code></dt></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_violation"><ahref="#val-compare_violation"class="anchor"></a><code><spanclass="keyword">val</span> compare_violation : <ahref="index.html#type-violation">violation</a><span>-></span><ahref="index.html#type-violation">violation</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-check"><ahref="#val-check"class="anchor"></a><code><spanclass="keyword">val</span> check : <ahref="../InferredNullability/index.html#type-t">InferredNullability.t</a><span>-></span><span><span>(unit,<ahref="index.html#type-violation">violation</a>)</span><ahref="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dd><p>violation of Dereference rule reflects possibility of dereferencing of `null`. Note that this might or might not be severe enough to be reported to the user, depending on the mode agreements.</p></dd></dl><dl><dtclass="spec module"id="module-ReportableViolation"><ahref="#module-ReportableViolation"class="anchor"></a><code><spanclass="keyword">module</span><ahref="ReportableViolation/index.html">ReportableViolation</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>Violation that needs to be reported to the user.</p></dd></dl></div></body></html>