blob: 904bd9ad9ffd0a9f11a168498529600bbe95ae90 [file] [log] [blame]
// RUN: rm -rf %t && mkdir %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