File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
test/SILOptimizer/lifetime_dependence Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ public func testTrivialInoutBorrow(p: inout UnsafePointer<Int>) -> Span<Int> {
417
417
418
418
private let immortalInt = 0
419
419
420
- private let immortalString = " "
420
+ private let immortalStrings : [ String ] = [ ]
421
421
422
422
@lifetime ( immortal)
423
423
func testImmortalInt( ) -> Span < Int > {
@@ -427,10 +427,10 @@ func testImmortalInt() -> Span<Int> {
427
427
}
428
428
429
429
@lifetime ( immortal)
430
- func testImmortalString ( ) -> Span < String > {
431
- let nilBasedBuffer = UnsafeBufferPointer < String > ( start: nil , count: 0 )
430
+ func testImmortalArray ( ) -> Span < [ String ] > {
431
+ let nilBasedBuffer = UnsafeBufferPointer < [ String ] > ( start: nil , count: 0 )
432
432
let span = Span ( base: nilBasedBuffer. baseAddress, count: nilBasedBuffer. count)
433
- return _overrideLifetime ( span, borrowing: immortalString )
433
+ return _overrideLifetime ( span, borrowing: immortalStrings )
434
434
}
435
435
436
436
let ptr = UnsafePointer < Int > ( bitPattern: 1 ) !
You can’t perform that action at this time.
0 commit comments