onekiloparsec / SwiftAA

The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
http://www.onekiloparsec.dev/
MIT License
171 stars 31 forks source link

Compile Errors with Xcode 11.4 Update NumericType does not conform to protocol 'AdditiveArithmetic' #90

Closed makramia closed 4 years ago

makramia commented 4 years ago

I updated my Xcode to 11.4 and got all below errors:

Type 'Magnitude' does not conform to protocol 'AdditiveArithmetic' Type 'Day' does not conform to protocol 'AdditiveArithmetic' Type 'Hour' does not conform to protocol 'AdditiveArithmetic' Type 'Minute' does not conform to protocol 'AdditiveArithmetic' Type 'Second' does not conform to protocol 'AdditiveArithmetic' Type 'AstronomicalUnit' does not conform to protocol 'AdditiveArithmetic' Type 'Parsec' does not conform to protocol 'AdditiveArithmetic' Type 'Meter' does not conform to protocol 'AdditiveArithmetic' Type 'Kilometer' does not conform to protocol 'AdditiveArithmetic' Type 'JulianDay' does not conform to protocol 'AdditiveArithmetic' Type 'Degree' does not conform to protocol 'AdditiveArithmetic' Type 'ArcMinute' does not conform to protocol 'AdditiveArithmetic' Type 'ArcSecond' does not conform to protocol 'AdditiveArithmetic' Type 'Radian' does not conform to protocol 'AdditiveArithmetic'

makramia commented 4 years ago

I solved the issue by extending NumericType protocol to AdditiveArithmetic in NumericType.swift file

public protocol _NumericType: AdditiveArithmetic { var value: Double { get } init(_ value: Double) func rounded(toIncrement increment: Self, rule: FloatingPointRoundingRule) -> Self }

onekiloparsec commented 4 years ago

Ok, thanks. I'll have a look to make an update release.

onekiloparsec commented 4 years ago

Currently fixing the issue but some new codesign errors appeared ???

onekiloparsec commented 4 years ago

Fixed. Upgrade to v2.2.3. You may consider support at some point, thanks! https://patreon.com/onekiloparsec