Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.79k stars 595 forks source link

BeLogical: fix retroactive conformance error. #1149

Closed TomerHacohen closed 2 weeks ago

TomerHacohen commented 2 weeks ago

Fixes the warning in the new Swift version solved here: https://github.com/swiftlang/swift/pull/36068

Which is:

Extension declares a conformance of imported type 'X' to imported protocol 'Y'; this will not behave correctly if the owners of 'CoreFoundation' introduce this conformance in the future

without adding the @retroactive, which does not compile in Xcode 15.

This way, extensions that declares a conformance to a type where both are from another module will compile without warning in Xcode 16, as the conformed type is declared to be explicitly from the imported module, which suppresses the warning.