mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
24 lines
831 B
Swift
24 lines
831 B
Swift
// RUN: %target-swift-frontend -typecheck %s
|
|
|
|
// REQUIRES: OS=ios
|
|
// FIXME: this test could use the %clang-importer-sdk, but swift tries to
|
|
// deserialize the real UIKit module and match it up with the mock SDK, and
|
|
// crashes. Another reason to stop using source imports.
|
|
|
|
import UIKit
|
|
|
|
// Check that we drop the variadic parameter from certain UIKit initializers.
|
|
func makeAnActionSheet() -> UIActionSheet {
|
|
return UIActionSheet(title: "Error",
|
|
delegate: nil,
|
|
cancelButtonTitle: "Cancel",
|
|
destructiveButtonTitle: "OK")
|
|
}
|
|
|
|
func makeAnAlertView() -> UIAlertView {
|
|
return UIAlertView(title: "Error",
|
|
message: "The operation completed successfully.",
|
|
delegate: nil,
|
|
cancelButtonTitle: "Abort")
|
|
}
|