diff --git a/validation-test/compiler_crashers_2_fixed/Inputs/rdar79383990.h b/validation-test/compiler_crashers_2_fixed/Inputs/rdar79383990.h new file mode 100644 index 0000000000000..dbe29c0ce3eba --- /dev/null +++ b/validation-test/compiler_crashers_2_fixed/Inputs/rdar79383990.h @@ -0,0 +1,12 @@ +@import Foundation; + +typedef NS_ENUM(NSInteger, BackgroundActivityResult) { + BackgroundActivityResultFinished = 1, + BackgroundActivityResultDeferred = 2, +}; + +typedef void (^BackgroundActivityCompletionHandler)(BackgroundActivityResult result); + +@interface BackgroundActivityScheduler : NSObject +- (void)scheduleWithBlock:(void (^)(BackgroundActivityCompletionHandler completionHandler))block; +@end diff --git a/validation-test/compiler_crashers_2_fixed/rdar79383990.swift b/validation-test/compiler_crashers_2_fixed/rdar79383990.swift index e3dc9cf219d4e..2c2f4ce080775 100644 --- a/validation-test/compiler_crashers_2_fixed/rdar79383990.swift +++ b/validation-test/compiler_crashers_2_fixed/rdar79383990.swift @@ -1,9 +1,9 @@ -// RUN: %target-swift-frontend %s -emit-silgen -disable-availability-checking +// RUN: %target-swift-frontend %s -emit-silgen -disable-availability-checking -import-objc-header %S/Inputs/rdar79383990.h // REQUIRES: objc_interop // REQUIRES: OS=macosx import Foundation -func test(s: NSBackgroundActivityScheduler) async { +func test(s: BackgroundActivityScheduler) async { _ = await s.schedule() }