File tree 3 files changed +9
-11
lines changed
3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1595,10 +1595,10 @@ void ASTMangler::appendContext(const DeclContext *ctx) {
1595
1595
return appendEntity (eed);
1596
1596
}
1597
1597
1598
- case DeclContextKind::SubscriptDecl:
1599
- // FIXME: We may need to do something here if subscripts contain any symbols
1600
- // exposed with linkage names, or if/when they get generic parameters.
1601
- return appendContext (ctx-> getParent ());
1598
+ case DeclContextKind::SubscriptDecl: {
1599
+ auto sd = cast<SubscriptDecl>(ctx);
1600
+ return appendEntity (sd);
1601
+ }
1602
1602
1603
1603
case DeclContextKind::Initializer:
1604
1604
switch (cast<Initializer>(ctx)->getInitializerKind ()) {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class GenericClass {
67
67
}
68
68
69
69
// CHECK: [[@LINE+2]]:3 s:14swift_ide_test12GenericClassCySfSicip{{$}}
70
- // CHECK: [[@LINE+1]]:13 s:14swift_ide_test12GenericClassC1iL_Sivp {{$}}
70
+ // CHECK: [[@LINE+1]]:13 s:14swift_ide_test12GenericClassCySfSicip1iL_Sivp {{$}}
71
71
subscript( i: Int ) -> Float {
72
72
// CHECK: [[@LINE+1]]:5 s:14swift_ide_test12GenericClassCySfSicig{{$}}
73
73
get { return 0.0 }
@@ -212,7 +212,7 @@ class ObjCClass1 {
212
212
class func staticFunc1( _ a: Int ) { }
213
213
214
214
// CHECK: [[@LINE+2]]:10 s:14swift_ide_test10ObjCClass1CyS2icip{{$}}
215
- // CHECK: [[@LINE+1]]:20 s:14swift_ide_test10ObjCClass1C1xL_Sivp {{$}}
215
+ // CHECK: [[@LINE+1]]:20 s:14swift_ide_test10ObjCClass1CyS2icip1xL_Sivp {{$}}
216
216
public subscript( x: Int ) -> Int {
217
217
218
218
// CHECK: [[@LINE+1]]:5 c:@M@swift_ide_test@objc(cs)ObjCClass1(im)objectAtIndexedSubscript:{{$}}
@@ -223,7 +223,7 @@ class ObjCClass1 {
223
223
}
224
224
225
225
// CHECK: [[@LINE+2]]:10 s:14swift_ide_test10ObjCClass1CySiACcip{{$}}
226
- // CHECK: [[@LINE+1]]:20 s:14swift_ide_test10ObjCClass1C1xL_ACvp {{$}}
226
+ // CHECK: [[@LINE+1]]:20 s:14swift_ide_test10ObjCClass1CySiACcip1xL_ACvp {{$}}
227
227
public subscript( x: ObjCClass1 ) -> Int {
228
228
229
229
// CHECK: [[@LINE+1]]:5 c:@M@swift_ide_test@objc(cs)ObjCClass1(im)objectForKeyedSubscript:{{$}}
Original file line number Diff line number Diff line change @@ -24,16 +24,14 @@ func customSourceLocation(a: Int) {}
24
24
// CHECK-FUNC-THEB-NOT: PARENT OFFSET
25
25
26
26
// RUN: %sourcekitd-test -req=cursor -pos=4:13 %s -- %s | %FileCheck -check-prefix=CHECK-SUBSCRIPT-A %s
27
- // FIXME: This USR is wrong; see https://bugs.swift.org/browse/SR-8660.
28
- // CHECK-SUBSCRIPT-A: s:17cursor_info_param12AccessorTestV1aL_Sivp
27
+ // CHECK-SUBSCRIPT-A: s:17cursor_info_param12AccessorTestV_1bS2i_Sitcip1aL_Sivp
29
28
// CHECK-SUBSCRIPT-A: PARENT OFFSET: 67
30
29
31
30
// RUN: %sourcekitd-test -req=cursor -pos=4:21 %s -- %s | %FileCheck -check-prefix=CHECK-SUBSCRIPT-B %s
32
31
// CHECK-SUBSCRIPT-B: s:17cursor_info_param12AccessorTestV
33
32
34
33
// RUN: %sourcekitd-test -req=cursor -pos=4:23 %s -- %s | %FileCheck -check-prefix=CHECK-SUBSCRIPT-THEB %s
35
- // FIXME: This USR is wrong; see https://bugs.swift.org/browse/SR-8660.
36
- // CHECK-SUBSCRIPT-THEB: s:17cursor_info_param12AccessorTestV4theBL_Sivp
34
+ // CHECK-SUBSCRIPT-THEB: s:17cursor_info_param12AccessorTestV_1bS2i_Sitcip4theBL_Sivp
37
35
// CHECK-SUBSCRIPT-THEB-NOT: PARENT OFFSET
38
36
39
37
// RUN: %sourcekitd-test -req=cursor -pos=7:9 %s -- %s | %FileCheck -check-prefix=CHECK-SETTER-V %s
You can’t perform that action at this time.
0 commit comments