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.

2 lines
2.5 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Nullsafe__AssignmentRule (infer.Nullsafe__AssignmentRule)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.0"/><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> &#x00BB; Nullsafe__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>&#45;&gt;</span> <a href="index.html#type-violation">violation</a> <span>&#45;&gt;</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="../Nullsafe/Nullability/index.html#type-t">Nullsafe.Nullability.t</a></span> <span>&#45;&gt;</span> <span>rhs:<a href="../Nullsafe/Nullability/index.html#type-t">Nullsafe.Nullability.t</a></span> <span>&#45;&gt;</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 &quot;less strict&quot; type to &quot;more strict&quot; type, this is an Assignment Rule violation.</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>