ReactiveX / RxSwift

Reactive Programming in Swift
MIT License
24.37k stars 4.17k forks source link

Resolves issue 2554 (Missing imports warn 'this is an error in Swift 6') #2555

Closed drewster99 closed 6 months ago

drewster99 commented 11 months ago

Summary

This commit resolves issue 2554, where Release builds of RxSwift (and other targets) emit many warnings that various references to Foundation types, such as Foundation.Date and Dispatch.DispatchTimeInterval, cannot be used because their definition was never imported, and that this warning will be a hard error in Swift 6.

Implementation detail

These are resolved by simply adding "import Foundation" to the files generating the warnings.

Other thoughts

If those files weren't importing Foundation on purpose, for some reason, the individual types needed could be imported instead.

freak4pc commented 6 months ago

Nice, thank you!