Skip to content

Commit d6ffad0

Browse files
committed
[Tests] NFC: Add a test-case for #84509
Looks like the issue has been fixed already, so adding a test-case to make sure that it doesn't regress in the future. Resolves: #84509 Resolves: rdar://161307898
1 parent b6291e6 commit d6ffad0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// RUN: %empty-directory(%t/src)
2+
// RUN: split-file %s %t/src
3+
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module %t/src/main.swift \
5+
// RUN: -import-objc-header %t/src/Test.h \
6+
// RUN: -swift-version 5 \
7+
// RUN: -enable-upcoming-feature NonisolatedNonsendingByDefault \
8+
// RUN: -module-name main -I %t -verify -verify-ignore-unrelated \
9+
// RUN: -parse-as-library -o %t/main.o
10+
11+
// REQUIRES: objc_interop
12+
// REQUIRES: swift_feature_NonisolatedNonsendingByDefault
13+
14+
//--- Test.h
15+
@import Foundation;
16+
17+
@protocol InterfaceT
18+
@end
19+
20+
@interface Base : NSObject
21+
- (void)prepareWithP:(nullable id<InterfaceT>)p completionHandler:(void (^ _Nonnull)(NSError * _Nullable))completionHandler;
22+
@end
23+
24+
//--- main.swift
25+
import Foundation
26+
27+
class Derived : Base {
28+
nonisolated(nonsending) override public func prepare(withP: (any InterfaceT)?) async throws {}
29+
}
30+

0 commit comments

Comments
 (0)