Skip to content

Commit 3d4e8a4

Browse files
committed
Add a test for indexing of overriding an Objc protocol declared method in Swift.
1 parent 63b7f05 commit 3d4e8a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/Index/index_imported_objc.swift

+6
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,9 @@ func test() { // CHECK: [[@LINE]]:6 | function/Swift | test() | [[s:.*]] | Def |
4242
c.protocolAddedMethod()
4343
// CHECK: [[@LINE-1]]:5 | instance-method/Swift | protocolAddedMethod() | c:objc(pl)MemberAdding(im)protocolAddedMethod | Ref,Call,Dyn,RelRec,RelCall,RelCont | rel: 2
4444
}
45+
class SubObjCClass: ObjCClass {
46+
override func protocolAddedMethod() {}
47+
// CHECK: [[@LINE-1]]:17 | instance-method/Swift | protocolAddedMethod() | c:@M@swift_ide_test@objc(cs)SubObjCClass(im)protocolAddedMethod | Def,Dyn,RelChild,RelOver | rel: 2
48+
// CHECK-NEXT: RelOver | instance-method/Swift | protocolAddedMethod() | c:objc(pl)MemberAdding(im)protocolAddedMethod
49+
// CHECK-NEXT: RelChild | class/Swift | SubObjCClass | c:@M@swift_ide_test@objc(cs)SubObjCClass
50+
}

0 commit comments

Comments
 (0)