@@ -179,6 +179,14 @@ struct PatternInitializers {
179
179
( c, d) = ( 1.5 , 2.5 )
180
180
}
181
181
182
+ protocol ProtoWithSubscript {
183
+ subscript( native: Int ) -> Int { get set }
184
+ }
185
+
186
+ func localPatternsWithSharedType( ) {
187
+ let i , j , k : Int
188
+ }
189
+
182
190
// RUN: not %target-swift-frontend -dump-scope-maps expanded %s 2> %t.expanded
183
191
// RUN: %FileCheck -check-prefix CHECK-EXPANDED %s < %t.expanded
184
192
@@ -370,6 +378,24 @@ struct PatternInitializers {
370
378
// CHECK-EXPANDED-NEXT: {{^}} `-BraceStmt {{.*}} [167:32 - 167:42] expanded
371
379
// CHECK-EXPANDED-NEXT: {{^}} `-AbstractFunctionParams {{.*}} defaultArguments(i:j:) param 0:1 [167:48 - 175:1] expanded
372
380
381
+ // CHECK-EXPANDED: -Accessors {{.*}} scope_map.(file).ProtoWithSubscript.subscript@{{.*}}scope_map.swift:183:3 [183:33 - 183:43] expanded
382
+ // CHECK-EXPANDED-NEXT: |-AbstractFunctionDecl {{.*}} _ [183:35 - 183:35] expanded
383
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 0:0 [183:35 - 183:35] expanded
384
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 1:0 [183:35 - 183:35] expanded
385
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionDecl {{.*}} _ [183:39 - 183:39] expanded
386
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 0:0 [183:39 - 183:39] expanded
387
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 1:0 [183:39 - 183:39] expanded
388
+ // CHECK-EXPANDED-NEXT: `-AbstractFunctionParams {{.*}} _ param 1:1 [183:39 - 183:39] expanded
389
+
390
+ // CHECK-EXPANDED: `-AbstractFunctionDecl {{.*}} localPatternsWithSharedType() [186:1 - 188:1] expanded
391
+ // CHECK-EXPANDED-NEXT: `-BraceStmt {{.*}} [186:36 - 188:1] expanded
392
+ // CHECK-EXPANDED-NEXT: `-PatternBinding {{.*}} entry 0 [187:7 - 188:1] expanded
393
+ // CHECK-EXPANDED-NEXT: `-AfterPatternBinding {{.*}} entry 0 [187:7 - 188:1] expanded
394
+ // CHECK-EXPANDED-NEXT: `-PatternBinding {{.*}} entry 1 [187:10 - 188:1] expanded
395
+ // CHECK-EXPANDED-NEXT: `-AfterPatternBinding {{.*}} entry 1 [187:10 - 188:1] expanded
396
+ // CHECK-EXPANDED-NEXT: `-PatternBinding {{.*}} entry 2 [187:13 - 188:1] expanded
397
+ // CHECK-EXPANDED-NEXT: `-AfterPatternBinding {{.*}} entry 2 [187:16 - 188:1] expanded
398
+
373
399
// RUN: not %target-swift-frontend -dump-scope-maps 70:8,26:20,5:18,166:32,179:18 %s 2> %t.searches
374
400
// RUN: %FileCheck -check-prefix CHECK-SEARCHES %s < %t.searches
375
401
0 commit comments