Revision 42e827e6e7247224c068a9dce8f6eabd2ab892ba authored by Devin Coughlin on 21 January 2016, 00:12:56 UTC, committed by Devin Coughlin on 21 January 2016, 01:22:15 UTC
This reverts commit f6dd24bb68b35292c3663c92c74508e97f247e53.
1 parent ac1f5a6
accessibility_framework.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: "")
Computing file changes ...