File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,32 @@ extension Decimal : SignedNumeric {
340
340
}
341
341
}
342
342
343
+ extension Decimal {
344
+ @available ( swift, obsoleted: 4 , message: " Please use arithmetic operators instead " )
345
+ @_transparent
346
+ public mutating func add( _ other: Decimal ) {
347
+ self += other
348
+ }
349
+
350
+ @available ( swift, obsoleted: 4 , message: " Please use arithmetic operators instead " )
351
+ @_transparent
352
+ public mutating func subtract( _ other: Decimal ) {
353
+ self -= other
354
+ }
355
+
356
+ @available ( swift, obsoleted: 4 , message: " Please use arithmetic operators instead " )
357
+ @_transparent
358
+ public mutating func multiply( by other: Decimal ) {
359
+ self *= other
360
+ }
361
+
362
+ @available ( swift, obsoleted: 4 , message: " Please use arithmetic operators instead " )
363
+ @_transparent
364
+ public mutating func divide( by other: Decimal ) {
365
+ self /= other
366
+ }
367
+ }
368
+
343
369
extension Decimal : Strideable {
344
370
public func distance( to other: Decimal ) -> Decimal {
345
371
return self - other
You can’t perform that action at this time.
0 commit comments