[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

@@ -93,7 +93,7 @@ extension String.CharacterView : Collection {
///
/// - Requires: The next value is representable.
public func successor() -> Index {
_require(_base != _base._viewEndIndex, "cannot increment endIndex")
_precondition(_base != _base._viewEndIndex, "cannot increment endIndex")
return Index(_base: _endBase)
}
@@ -101,7 +101,7 @@ extension String.CharacterView : Collection {
///
/// - Requires: The previous value is representable.
public func predecessor() -> Index {
_require(_base != _base._viewStartIndex,
_precondition(_base != _base._viewStartIndex,
"cannot decrement startIndex")
let predecessorLengthUTF16 =
Index._measureExtendedGraphemeClusterBackward(_base)