Files
swift-mirror/test/ClangModules/accessibility_framework.swift
Joe Pamer 828eb68e72 Commit DaveA's API changes to 'print', along with the compiler changes necessary to support them.
There's still work left to do. In terms of next steps, there's still rdar://problem/22126141, which covers removing the 'workaround' overloads for print (that prevent bogus overload resolution failures), as well as providing a decent diagnostic when users invoke print with 'appendNewline'.

Swift SVN r30976
2015-08-04 01:57:11 +00:00

30 lines
1.0 KiB
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -parse -verify %s
// REQUIRES: OS=macosx
// REQUIRES: objc_interop
// The accessibility APIs are handled differently. A class might conform to both
// NSAccessibility (containing accessibility properties) and individual
// accessibility protocols (containing accessibility methods with the same
// names as the properties). This should not compile. To avoid the problem, we
// import setters and getters instead of the accessibility properties from
// NSAccessibility.
//
// radar://17509751
import AppKit
class A: NSView, NSAccessibilityButton {
override func accessibilityLabel() -> String? {return "Anna's button"}
override func accessibilityPerformPress() -> Bool {return true}
override func accessibilityParent() -> AnyObject? {return nil}
override func isAccessibilityFocused() -> Bool {return false}
}
class AA: NSView {
override func accessibilityPerformPress() -> Bool {return true}
}
let a = A()
print(a.accessibilityLabel(), terminator: "")