Closed maartene closed 4 months ago
Since XCTest
depends on Foundation
, it seems that importing implicitly imports Foundation
as well.
By the way, this code may be broken due to the new feature in the future Swift release. When the new feature, accessLevel import, is enabled, such implicit imports will no longer be allowed. https://github.com/swiftlang/swift-evolution/blob/main/proposals/0409-access-level-on-imports.md
This code will not be correct in future versions of Swift even if it uses XCTest
, so you should probably make the import Foundation
explicit yourself.
So I suggest to add import Foundation
explicitly.
Thank you.
This makes a lot of sense! Thanks also for the link to the proposal. Getting rid of implicit imports sounds like a good idea.
After conversion, because
import XCTest
is gone, the compiler can't resolve UUID any more.Perhaps always importing Foundation if it is not already imported?
KR Maarten