diff --git a/test/Concurrency/attr_execution/issue-84509.swift b/test/Concurrency/attr_execution/issue-84509.swift new file mode 100644 index 0000000000000..a8f2eea20efd4 --- /dev/null +++ b/test/Concurrency/attr_execution/issue-84509.swift @@ -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)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 {} +} +