File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
FirebaseCore/Internal/Tests/Unit Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,11 @@ class HeartbeatStorageTests: XCTestCase {
6464 func testCachedInstancesCannotBeRetainedWeakly( ) {
6565 // Given
6666 var strongHeartbeatStorage : HeartbeatStorage ? = . getInstance( id: " sparky " )
67- weak var weakHeartbeatStorage : HeartbeatStorage ? = . getInstance( id: " sparky " )
67+ #if swift(>=6.2)
68+ weak let weakHeartbeatStorage : HeartbeatStorage ? = . getInstance( id: " sparky " )
69+ #else
70+ weak var weakHeartbeatStorage : HeartbeatStorage ? = . getInstance( id: " sparky " )
71+ #endif
6872 XCTAssert (
6973 strongHeartbeatStorage === weakHeartbeatStorage,
7074 " Instances should reference the same object. "
Original file line number Diff line number Diff line change @@ -316,7 +316,11 @@ import Foundation
316316 var prefixes = [ StorageReference] ( )
317317 var items = [ StorageReference] ( )
318318
319- weak var weakSelf = self
319+ #if swift(>=6.2)
320+ weak let weakSelf = self
321+ #else
322+ weak var weakSelf = self
323+ #endif
320324
321325 var paginatedCompletion : ( ( _: StorageListResult ? , _: Error ? ) -> Void ) ?
322326 paginatedCompletion = { ( _ listResult: StorageListResult ? , _ error: Error ? ) in
You can’t perform that action at this time.
0 commit comments