[stdlib] all sorts of require renamed back to precondition

This commit is contained in:
Max Moiseev
2016-02-19 18:21:29 -08:00
parent b1ef18fb75
commit 40b1a0b7e0
77 changed files with 360 additions and 378 deletions

View File

@@ -301,7 +301,7 @@ extension String.UnicodeScalarIndex {
if utf16Index != utf16.startIndex
&& utf16Index != utf16.endIndex {
_require(
_precondition(
utf16Index >= utf16.startIndex
&& utf16Index <= utf16.endIndex,
"Invalid String.UTF16Index for this UnicodeScalar view")
@@ -329,7 +329,7 @@ extension String.UnicodeScalarIndex {
) {
let core = unicodeScalars._core
_require(
_precondition(
utf8Index._coreIndex >= 0 && utf8Index._coreIndex <= core.endIndex,
"Invalid String.UTF8Index for this UnicodeScalar view")