File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -4180,7 +4180,7 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
41804180 writeABIOnlyCounterpart (abiRole.getCounterpartUnchecked ());
41814181
41824182 // Emit attributes (if any).
4183- for (auto Attr : D->getAttrs ())
4183+ for (auto Attr : D->getSemanticAttrs ())
41844184 writeDeclAttribute (D, Attr);
41854185
41864186 if (auto *value = dyn_cast<ValueDecl>(D))
Original file line number Diff line number Diff line change 1+ // %empty-directory(%t)
2+ // RUN: split-file %s %t
3+
4+ // REQUIRES: swift_feature_NonisolatedNonsendingByDefault
5+
6+ // Test both with and without '-experimental-lazy-typecheck'
7+ // RUN: %swift-frontend -emit-module %t/Lib.swift -swift-version 6 -experimental-lazy-typecheck -experimental-skip-all-function-bodies -enable-upcoming-feature NonisolatedNonsendingByDefault -module-name Lib -o %t/Modules/Lib.swiftmodule
8+ // RUN: %swift-frontend -emit-sil %t/Test.swift -I %t/Modules -swift-version 6 -enable-upcoming-feature NonisolatedNonsendingByDefault
9+
10+ // RUN: %swift-frontend -emit-module %t/Lib.swift -swift-version 6 -experimental-skip-all-function-bodies -enable-upcoming-feature NonisolatedNonsendingByDefault -module-name Lib -o %t/Modules/Lib.swiftmodule
11+ // RUN: %swift-frontend -emit-sil %t/Test.swift -I %t/Modules -swift-version 6 -enable-upcoming-feature NonisolatedNonsendingByDefault
12+
13+ //--- Lib.swift
14+
15+ public final class IndexStoreDownloadManager2 : Sendable {
16+ public func withIndexStore(
17+ body: ( String ) async throws -> Void
18+ ) async throws {
19+ }
20+ }
21+
22+ //--- Test.swift
23+
24+ import Lib
25+
26+ private func `import`(
27+ indexStoreDownloadManager: IndexStoreDownloadManager2 ,
28+ ) async throws {
29+ import2 (
30+ indexStoreProvider: { runWithIndexStore in
31+ // Make sure we don't error here since `withIndexStore` is nonisolated(nonsending)
32+ try await indexStoreDownloadManager. withIndexStore ( body: runWithIndexStore)
33+ }
34+ )
35+ }
36+
37+ func import2(
38+ indexStoreProvider: ( _ runWithIndexStore: ( _ indexStore: String ) async throws -> Void ) async throws -> Void ,
39+ ) {
40+ }
You can’t perform that action at this time.
0 commit comments