[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

@@ -507,7 +507,7 @@ public struct ${Self} : ${Traversal}Index {
internal var _box: _${Traversal}IndexBoxProtocol
public func _distance(to other: ${Self}) -> ${Self}.Distance {
require(
precondition(
self._typeID == other._typeID,
"distance: base index types differ.")
return self._box._distance(to: other._box)
@@ -521,7 +521,7 @@ public struct ${Self} : ${Traversal}Index {
/// identical.
@warn_unused_result
public func == (lhs: ${Self}, rhs: ${Self}) -> Bool {
require(lhs._typeID == rhs._typeID, "base index types differ.")
precondition(lhs._typeID == rhs._typeID, "base index types differ.")
return lhs._box.equals(rhs._box)
}
% end