File tree Expand file tree Collapse file tree 2 files changed +27
-7
lines changed
test/SourceKit/CursorInfo Expand file tree Collapse file tree 2 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -263,13 +263,10 @@ struct SynthesizedExtensionAnalyzer::Implementation {
263
263
InfoMap(collectSynthesizedExtensionInfo(AllGroups)) {}
264
264
265
265
unsigned countInherits (ExtensionDecl *ED) {
266
- unsigned Count = 0 ;
267
- for (auto TL : ED->getInherited ()) {
268
- auto *nominal = TL.getType ()->getAnyNominal ();
269
- if (nominal && Options.shouldPrint (nominal))
270
- Count ++;
271
- }
272
- return Count;
266
+ SmallVector<TypeLoc, 4 > Results;
267
+ getInheritedForPrinting (
268
+ ED, [&](const Decl *D) { return Options.shouldPrint (D); }, Results);
269
+ return Results.size ();
273
270
}
274
271
275
272
std::pair<SynthesizedExtensionInfo, ExtensionMergeInfo>
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %{python} %utils/split_file.py -o %t %s
3
+ // RUN: %sourcekitd-test -req=cursor -pos=8:37 %t/first.swift -- %t/first.swift %t/second.swift | %FileCheck %s
4
+
5
+ // CHECK: source.lang.swift.ref.var.instance (6:9-6:12)
6
+
7
+
8
+ // BEGIN first.swift
9
+ protocol ChatDataSourceDelegateProtocol {
10
+ func chatDataSourceDidUpdate( )
11
+ }
12
+
13
+ class BaseChatViewController {
14
+ var foo = 1
15
+ func bar( ) {
16
+ print ( self . /*cursor-info->*/foo)
17
+ }
18
+ }
19
+
20
+ // BEGIN second.swift
21
+ extension BaseChatViewController : ChatDataSourceDelegateProtocol {
22
+ func chatDataSourceDidUpdate( ) { fatalError ( ) }
23
+ }
You can’t perform that action at this time.
0 commit comments