Skip to content

Commit c7b3d59

Browse files
authored
Remove Decimal.zero because Decimal inherit it from AdditiveArithmetic (#710)
Resolves: rdar://130426458
1 parent d3610e9 commit c7b3d59

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sources/FoundationEssentials/Decimal/Decimal+Conformances.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,17 @@ extension Decimal /* : SignedNumeric */ {
503503
self = Decimal(_exponent: exponent, _length: UInt32(length), _isNegative: negative, _isCompact: 1, _reserved: 0, _mantissa: mantissaParts)
504504
}
505505

506+
#if FOUNDATION_FRAMEWORK
507+
@usableFromInline internal static var __zeroForABI: Decimal {
508+
@_silgen_name("$sSo9NSDecimala10FoundationE4zeroABvgZ")
509+
get {
510+
return Decimal(0)
511+
}
512+
}
513+
#else
514+
// We need this symbol until Decimal fully conform to SignedNumeric
506515
public static var zero: Decimal {
507516
return Decimal(0)
508517
}
518+
#endif
509519
}

0 commit comments

Comments
 (0)