@@ -20,7 +20,7 @@ import _SwiftCoreFoundationOverlayShims
20
20
/// A `Measurement` is a model type that holds a `Double` value associated with a `Unit`.
21
21
///
22
22
/// Measurements support a large set of operators, including `+`, `-`, `*`, `/`, and a full set of comparison operators.
23
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
23
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
24
24
public struct Measurement < UnitType : Unit > : ReferenceConvertible , Comparable , Equatable {
25
25
public typealias ReferenceType = NSMeasurement
26
26
@@ -41,7 +41,7 @@ public struct Measurement<UnitType : Unit> : ReferenceConvertible, Comparable, E
41
41
}
42
42
}
43
43
44
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
44
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
45
45
extension Measurement : CustomStringConvertible , CustomDebugStringConvertible , CustomReflectable {
46
46
public var description : String {
47
47
return " \( value) \( unit. symbol) "
@@ -61,7 +61,7 @@ extension Measurement : CustomStringConvertible, CustomDebugStringConvertible, C
61
61
62
62
63
63
/// When a `Measurement` contains a `Dimension` unit, it gains the ability to convert between the kinds of units in that dimension.
64
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
64
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
65
65
extension Measurement where UnitType : Dimension {
66
66
/// Returns a new measurement created by converting to the specified unit.
67
67
///
@@ -117,7 +117,7 @@ extension Measurement where UnitType : Dimension {
117
117
}
118
118
}
119
119
120
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
120
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
121
121
extension Measurement {
122
122
/// Add two measurements of the same Unit.
123
123
/// - precondition: The `unit` of `lhs` and `rhs` must be `isEqual`.
@@ -212,7 +212,7 @@ internal typealias MeasurementBridgeType = _ObjectTypeBridgeable
212
212
internal typealias MeasurementBridgeType = _ObjectiveCBridgeable
213
213
#endif
214
214
215
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
215
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
216
216
extension Measurement : MeasurementBridgeType {
217
217
@_semantics ( " convertToObjectiveC " )
218
218
public func _bridgeToObjectiveC( ) -> NSMeasurement {
@@ -238,7 +238,7 @@ extension Measurement : MeasurementBridgeType {
238
238
}
239
239
}
240
240
241
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
241
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
242
242
extension NSMeasurement : _HasCustomAnyHashableRepresentation {
243
243
// Must be @nonobjc to avoid infinite recursion during bridging.
244
244
@nonobjc
@@ -252,7 +252,7 @@ extension NSMeasurement : _HasCustomAnyHashableRepresentation {
252
252
}
253
253
254
254
// This workaround is required for the time being, because Swift doesn't support covariance for Measurement (26607639)
255
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
255
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
256
256
extension MeasurementFormatter {
257
257
public func string< UnitType> ( from measurement: Measurement < UnitType > ) -> String {
258
258
if let result = string ( for: measurement) {
@@ -263,7 +263,7 @@ extension MeasurementFormatter {
263
263
}
264
264
}
265
265
266
- // @available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
266
+ // @available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
267
267
// extension Unit : Codable {
268
268
// public convenience init(from decoder: Decoder) throws {
269
269
// let container = try decoder.singleValueContainer()
@@ -277,7 +277,7 @@ extension MeasurementFormatter {
277
277
// }
278
278
// }
279
279
280
- @available ( OSX 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
280
+ @available ( macOS 10 . 12 , iOS 10 . 0 , watchOS 3 . 0 , tvOS 10 . 0 , * )
281
281
extension Measurement : Codable {
282
282
private enum CodingKeys : Int , CodingKey {
283
283
case value
0 commit comments