mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Tests] NFC: Add a test-case for https://github.com/swiftlang/swift/issues/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: https://github.com/swiftlang/swift/issues/84509 Resolves: rdar://161307898
This commit is contained in:
30
test/Concurrency/attr_execution/issue-84509.swift
Normal file
30
test/Concurrency/attr_execution/issue-84509.swift
Normal file
@@ -0,0 +1,30 @@
|
||||
// RUN: %empty-directory(%t/src)
|
||||
// RUN: split-file %s %t/src
|
||||
|
||||
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module %t/src/main.swift \
|
||||
// RUN: -import-objc-header %t/src/Test.h \
|
||||
// RUN: -swift-version 5 \
|
||||
// RUN: -enable-upcoming-feature NonisolatedNonsendingByDefault \
|
||||
// RUN: -module-name main -I %t -verify -verify-ignore-unrelated \
|
||||
// RUN: -parse-as-library -o %t/main.o
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: swift_feature_NonisolatedNonsendingByDefault
|
||||
|
||||
//--- Test.h
|
||||
@import Foundation;
|
||||
|
||||
@protocol InterfaceT
|
||||
@end
|
||||
|
||||
@interface Base : NSObject
|
||||
- (void)prepareWithP:(nullable id<InterfaceT>)p completionHandler:(void (^ _Nonnull)(NSError * _Nullable))completionHandler;
|
||||
@end
|
||||
|
||||
//--- main.swift
|
||||
import Foundation
|
||||
|
||||
class Derived : Base {
|
||||
nonisolated(nonsending) override public func prepare(withP: (any InterfaceT)?) async throws {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user