File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,34 @@ public struct Foo: Hashable {
136136 print ( " Not inlinable " )
137137 }
138138
139+ // CHECK: public subscript(i: [[INT]]) -> [[INT]] {
140+ // CHECK-NEXT: get{{$}}
141+ // CHECK-NEXT: @inlinable set[[NEWVALUE]] { print("set") }
142+ // CHECK-NEXT: }
143+ public subscript( i: Int ) -> Int {
144+ get { return 0 }
145+ @inlinable set { print ( " set " ) }
146+ }
147+
148+ // CHECK: public subscript(j: [[INT]], k: [[INT]]) -> [[INT]] {
149+ // CHECK-NEXT: @inlinable get { return 0 }
150+ // CHECK-NEXT: set[[NEWVALUE]]{{$}}
151+ // CHECK-NEXT: }
152+ public subscript( j: Int , k: Int ) -> Int {
153+ @inlinable get { return 0 }
154+ set { print ( " set " ) }
155+ }
156+
157+ // CHECK: @inlinable public subscript(l: [[INT]], m: [[INT]], n: [[INT]]) -> [[INT]] {
158+ // CHECK-NEXT: get { return 0 }
159+ // CHECK-NEXT: set[[NEWVALUE]] { print("set") }
160+ // CHECK-NEXT: }
161+ @inlinable
162+ public subscript( l: Int , m: Int , n: Int ) -> Int {
163+ get { return 0 }
164+ set { print ( " set " ) }
165+ }
166+
139167 // CHECK: public init(value: [[INT]]) {
140168 // CHECK-NEXT: topLevelUsableFromInline()
141169 // CHECK-NEXT: noAccessors = value
You can’t perform that action at this time.
0 commit comments