Files
swift-mirror/test/expr/unary/selector/Inputs/property_helper.swift
Doug Gregor 7dd1c87dd3 [SE-0160] Warn about uses of @objc declarations that used deprecated @objc inference.
When in Swift 3 compatibility mode without
`-warn-swift3-objc-inference`, warn on the *uses* of declarations that
depend on the Objective-C runtime that became `@objc` due to the
deprecated inference rule. This far more directly captures important
uses of the deprecated Objective-C entrypoints. We diagnose:

* `#selector` expressions that refer to one of these `@objc` members
* `#keyPath` expressions that refer to one of these `@objc` members
* Dynamic lookup (i.e., member access via `AnyObject`) that refers to
  one of these `@objc` members.
2017-03-31 21:22:15 -07:00

12 lines
393 B
Swift

import ObjectiveC
class OtherObjCClass: NSObject {
@objc private var privateVar = 1 // expected-note 4{{privateVar' declared here}}
@objc private(set) var privateSetVar = 2 // expected-note 2{{'privateSetVar' declared here}}
@objc internal var internalVar = 2
@objc internal func internalFunc() {}
private func privateFunc() {} // expected-note 2{{'privateFunc' declared here}}
}