---
layout: "default"
title: "precondition"
description: "Swift documentation for 'precondition': Check a necessary condition for making forward progress."
keywords: "precondition,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-precondition_-autoclosure-bool_-autoclosure-string-file_-staticstring-line_-uword">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-precondition_-autoclosure-bool_-autoclosure-string-file_-staticstring-line_-uword">func precondition(<w