You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>AssignmentRule (infer.Nullsafe.AssignmentRule)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../../index.html">infer</a> » <a href="../index.html">Nullsafe</a> » AssignmentRule</nav><h1>Module <code>Nullsafe.AssignmentRule</code></h1></header><aside><p>Assignment rule should be checked when a value is assigned to a location. Assignment can be explicit (lhs = rhs) or implicit (e.g. returning from a function). This rule checks if null can be passed to a place that does not expect null.</p></aside><dl><dt class="spec type" id="type-violation"><a href="#type-violation" class="anchor"></a><code><span class="keyword">type</span> violation</code></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_violation"><a href="#val-compare_violation" class="anchor"></a><code><span class="keyword">val</span> compare_violation : <a href="index.html#type-violation">violation</a> <span>-></span> <a href="index.html#type-violation">violation</a> <span>-></span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-check"><a href="#val-check" class="anchor"></a><code><span class="keyword">val</span> check : <span>lhs:<a href="../AnnotatedNullability/index.html#type-t">AnnotatedNullability.t</a></span> <span>-></span> <span>rhs:<a href="../InferredNullability/index.html#type-t">InferredNullability.t</a></span> <span>-></span> <span><span>(unit, <a href="index.html#type-violation">violation</a>)</span> <a href="../../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.result</span></code></dt><dd><p>If `null` can leak from a "less strict" type to "more strict" type, this is an Assignment Rule violation.</p></dd></dl><dl><dt class="spec module" id="module-ProvisionalViolation"><a href="#module-ProvisionalViolation" class="anchor"></a><code><span class="keyword">module</span> <a href="ProvisionalViolation/index.html">ProvisionalViolation</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Violation that will occur if the provisional annotation becomes real <code>@Nullable</code></p></dd></dl><dl><dt class="spec module" id="module-ReportableViolation"><a href="#module-ReportableViolation" class="anchor"></a><code><span class="keyword">module</span> <a href="ReportableViolation/index.html">ReportableViolation</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></dt><dd><p>Violation that needs to be reported to the user.</p></dd></dl></div></body></html>
|