File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,11 @@ SymbolInfo index::getSymbolInfoForDecl(const Decl *D) {
249249 info.Properties |= SymbolProperty::Local;
250250 }
251251
252+ if (auto *FD = dyn_cast<AbstractFunctionDecl>(D)) {
253+ if (FD->hasAsync ())
254+ info.Properties |= SymbolProperty::SwiftAsync;
255+ }
256+
252257 return info;
253258}
254259
Original file line number Diff line number Diff line change 1+ // REQUIRES: concurrency
2+
3+ // RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s | %FileCheck %s
4+
5+ func globalAsyncFunc( ) async { }
6+ // CHECK: [[@LINE-1]]:6 | function(swift_async)/Swift | globalAsyncFunc() | {{.*}} | Def | rel: 0
7+
8+ struct MyStruct {
9+ func asyncMethod( ) async { }
10+ // CHECK: [[@LINE-1]]:8 | instance-method(swift_async)/Swift | asyncMethod() |
11+ }
12+
13+ class XCTestCase { }
14+ class MyTestCase : XCTestCase {
15+ func testSomeAsync( ) async { }
16+ // CHECK: [[@LINE-1]]:8 | instance-method(test,swift_async)/Swift | testSomeAsync() |
17+ }
You can’t perform that action at this time.
0 commit comments