@@ -17,9 +17,11 @@ import Darwin
17
17
// CGAffineTransform
18
18
//===----------------------------------------------------------------------===//
19
19
20
- extension CGAffineTransform : Equatable { }
21
- public func == ( lhs: CGAffineTransform , rhs: CGAffineTransform ) -> Bool {
22
- return lhs. __equalTo ( rhs)
20
+ extension CGAffineTransform : Equatable {
21
+ public static func == ( lhs: CGAffineTransform ,
22
+ rhs: CGAffineTransform ) -> Bool {
23
+ return lhs. __equalTo ( rhs)
24
+ }
23
25
}
24
26
25
27
//===----------------------------------------------------------------------===//
@@ -46,6 +48,19 @@ extension CGColor {
46
48
#endif
47
49
}
48
50
51
+ public protocol _CGColorInitTrampoline {
52
+ init ( red: CGFloat , green: CGFloat , blue: CGFloat , alpha: CGFloat )
53
+ }
54
+
55
+ extension _CGColorInitTrampoline {
56
+ public init ( colorLiteralRed red: Float , green: Float , blue: Float ,
57
+ alpha: Float ) {
58
+ self . init ( red: CGFloat ( red) , green: CGFloat ( green) , blue: CGFloat ( blue) ,
59
+ alpha: CGFloat ( alpha) )
60
+ }
61
+ }
62
+
63
+ extension CGColor : _CGColorInitTrampoline , _ExpressibleByColorLiteral { }
49
64
50
65
//===----------------------------------------------------------------------===//
51
66
// CGColorSpace
@@ -228,10 +243,11 @@ extension CGPoint : CustomDebugStringConvertible {
228
243
}
229
244
}
230
245
231
- extension CGPoint : Equatable { }
232
- @_transparent // @fragile
233
- public func == ( lhs: CGPoint , rhs: CGPoint ) -> Bool {
234
- return lhs. x == rhs. x && lhs. y == rhs. y
246
+ extension CGPoint : Equatable {
247
+ @_transparent // @fragile
248
+ public static func == ( lhs: CGPoint , rhs: CGPoint ) -> Bool {
249
+ return lhs. x == rhs. x && lhs. y == rhs. y
250
+ }
235
251
}
236
252
237
253
public extension CGSize {
@@ -279,10 +295,11 @@ extension CGSize : CustomDebugStringConvertible {
279
295
}
280
296
}
281
297
282
- extension CGSize : Equatable { }
283
- @_transparent // @fragile
284
- public func == ( lhs: CGSize , rhs: CGSize ) -> Bool {
285
- return lhs. width == rhs. width && lhs. height == rhs. height
298
+ extension CGSize : Equatable {
299
+ @_transparent // @fragile
300
+ public static func == ( lhs: CGSize , rhs: CGSize ) -> Bool {
301
+ return lhs. width == rhs. width && lhs. height == rhs. height
302
+ }
286
303
}
287
304
288
305
public extension CGVector {
@@ -302,10 +319,11 @@ public extension CGVector {
302
319
}
303
320
}
304
321
305
- extension CGVector : Equatable { }
306
- @_transparent // @fragile
307
- public func == ( lhs: CGVector , rhs: CGVector ) -> Bool {
308
- return lhs. dx == rhs. dx && lhs. dy == rhs. dy
322
+ extension CGVector : Equatable {
323
+ @_transparent // @fragile
324
+ public static func == ( lhs: CGVector , rhs: CGVector ) -> Bool {
325
+ return lhs. dx == rhs. dx && lhs. dy == rhs. dy
326
+ }
309
327
}
310
328
311
329
extension CGVector : CustomDebugStringConvertible {
@@ -380,10 +398,11 @@ extension CGRect : CustomDebugStringConvertible {
380
398
}
381
399
}
382
400
383
- extension CGRect : Equatable { }
384
- @_transparent // @fragile
385
- public func == ( lhs: CGRect , rhs: CGRect ) -> Bool {
386
- return lhs. equalTo ( rhs)
401
+ extension CGRect : Equatable {
402
+ @_transparent // @fragile
403
+ public static func == ( lhs: CGRect , rhs: CGRect ) -> Bool {
404
+ return lhs. equalTo ( rhs)
405
+ }
387
406
}
388
407
389
408
extension CGAffineTransform {
0 commit comments