Skip to content

Commit ee3869f

Browse files
committed
[Test] Add some availability.
1 parent 459bdb0 commit ee3869f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/SILGen/read_requirements.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
// - a get accessor
2222
// - an unsafeAddress accessor
2323

24+
// TODO: CoroutineAccessors: Replace SwiftStdlib 9999 with SwiftStdlib X.Y.
25+
2426
@frozen
2527
public struct U : ~Copyable {}
2628

@@ -30,9 +32,11 @@ public protocol P1 : ~Copyable {
3032
@_borrowed
3133
var ubgs: U { get set }
3234
}
35+
@available(SwiftStdlib 9999, *)
3336
public protocol P2 : ~Copyable {
3437
var urs: U { read set }
3538
}
39+
@available(SwiftStdlib 6.0, *)
3640
public protocol P3 : ~Copyable {
3741
var ur: U { read }
3842
}
@@ -83,6 +87,7 @@ public struct ImplAStored : ~Copyable & P1 {
8387
}
8488

8589
@frozen
90+
@available(SwiftStdlib 9999, *)
8691
public struct ImplBStored : ~Copyable & P2 {
8792
var dummy: ()
8893
public var urs: U
@@ -130,6 +135,7 @@ public struct ImplBStored : ~Copyable & P2 {
130135
}
131136

132137
@frozen
138+
@available(SwiftStdlib 6.0, *)
133139
public struct ImplCStored : ~Copyable & P3 {
134140
var dummy: ()
135141
public var ur: U
@@ -229,6 +235,7 @@ public struct ImplAUnderscoredCoroutineAccessors : ~Copyable & P1 {
229235
}
230236

231237
@frozen
238+
@available(SwiftStdlib 9999, *)
232239
public struct ImplBUnderscoredCoroutineAccessors : ~Copyable & P2 {
233240
var _i: U
234241
public var urs: U {
@@ -282,6 +289,7 @@ public struct ImplBUnderscoredCoroutineAccessors : ~Copyable & P2 {
282289
}
283290

284291
@frozen
292+
@available(SwiftStdlib 6.0, *)
285293
public struct ImplCUnderscoredCoroutineAccessors : ~Copyable & P3 {
286294
var _i: U
287295
public var ur: U {
@@ -395,6 +403,7 @@ struct ImplACoroutineAccessors : ~Copyable & P1 {
395403
}
396404

397405
@frozen
406+
@available(SwiftStdlib 9999, *)
398407
public struct ImplBCoroutineAccessors : ~Copyable & P2 {
399408
var _i: U
400409
public var urs: U {
@@ -480,6 +489,7 @@ public struct ImplBCoroutineAccessors : ~Copyable & P2 {
480489
}
481490

482491
@frozen
492+
@available(SwiftStdlib 6.0, *)
483493
public struct ImplCCoroutineAccessors : ~Copyable & P3 {
484494
var _i: U
485495
public var ur: U {
@@ -622,6 +632,7 @@ public struct ImplAGetSet : P1 {
622632
}
623633

624634
@frozen
635+
@available(SwiftStdlib 9999, *)
625636
public struct ImplBGetSet : P2 {
626637
var _i: U {
627638
get { return U() }
@@ -682,6 +693,7 @@ public struct ImplBGetSet : P2 {
682693
}
683694

684695
@frozen
696+
@available(SwiftStdlib 6.0, *)
685697
public struct ImplCGetSet : P3 {
686698
var _i: U {
687699
get { return U() }
@@ -803,6 +815,7 @@ public struct ImplAUnsafeAddressors : P1 {
803815
}
804816

805817
@frozen
818+
@available(SwiftStdlib 9999, *)
806819
public struct ImplBUnsafeAddressors : P2 {
807820
var iAddr: UnsafePointer<U>
808821
var iMutableAddr: UnsafeMutablePointer<U> {
@@ -868,6 +881,7 @@ public struct ImplBUnsafeAddressors : P2 {
868881
}
869882

870883
@frozen
884+
@available(SwiftStdlib 6.0, *)
871885
public struct ImplCUnsafeAddressors : P3 {
872886
var iAddr: UnsafePointer<U>
873887
var iMutableAddr: UnsafeMutablePointer<U> {

0 commit comments

Comments
 (0)