mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
766 B
Swift
20 lines
766 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -verify-ignore-unrelated -I %S/Inputs/custom-modules %s
|
|
|
|
// REQUIRES: OS=watchos
|
|
|
|
import Foundation
|
|
import AvailabilityExtras
|
|
|
|
func test_unavailable_because_deprecated() {
|
|
// This is transcribed by clang to be deprecated on watchOS 2.0
|
|
// We don't currently treat these unavailable, but the policy decision
|
|
// hasn't been made yet.
|
|
// rdar://problem/20948019 tracks changing this, if needed, when the
|
|
// policy decision is made.
|
|
print(NSRealMemoryAvailable()) // expected-warning {{'NSRealMemoryAvailable()' was deprecated in watchOS 2.0}}
|
|
}
|
|
|
|
func test_swift_unavailable_wins() {
|
|
unavailableWithOS() // expected-error {{'unavailableWithOS()' is unavailable in Swift}}
|
|
}
|