blob: a6a20605037cab62db358e1722d32c1af52821f0 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module %s -DLIBRARY -o %t/Lib.swiftmodule
// RUN: %target-swift-frontend -typecheck %s -I %t -verify
// REQUIRES: objc_interop
#if LIBRARY
import Foundation
public class Test: NSObject {
@objc public var prop: NSObject?
}
#else
import Lib
func test() {
_ = #keyPath(Test.prop) // okay
_ = #keyPath(Test.nonexistent) // expected-error {{type 'Test' has no member 'nonexistent'}}
}
#endif