mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Completely mechanical changes: - Explicit @objc in a few places - Some imported APIs changed - For the mix-and-match tests, just test version 4/5 instead of 3/4
25 lines
621 B
Swift
25 lines
621 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
|
|
// NSButtonType (from AppKit) and UIViewAnimationCurve (from UIKit) both have
|
|
// private enumerators, so we preserve their values through raw value
|
|
// conversion operations.
|
|
// (Really we do this for all NS_ENUMs, though we reserve the right to do
|
|
// strict checking if we get a guarantee that certain types don't have
|
|
// hidden or future enumeration values.)
|
|
|
|
#if os(macOS)
|
|
import AppKit
|
|
|
|
print(NSButton.ButtonType(rawValue: 20721)!.rawValue)
|
|
#endif
|
|
|
|
#if os(iOS)
|
|
import UIKit
|
|
|
|
print(UIViewAnimationCurve(rawValue: 20721)!.rawValue)
|
|
#endif
|
|
|
|
// CHECK: 20721
|
|
|