mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
While doing #76740 I iteratively was adding new `REQUIRES:` as new usages of the features were found, but I did not realize that at the same time other people might be removing some of those usages. The tests in this commit had some `REQUIRES:` line for a previous `-enable-experimental/upcoming-feature`, but they not longer use those features, so the `REQUIRES:` were effectively disabling the tests (at least in the case of `KeyPathWithStaticMembers`. In other cases they might still had executed).
15 lines
674 B
Swift
15 lines
674 B
Swift
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enforce-exclusivity=checked -primary-file %s -o /dev/null -verify
|
|
|
|
// AccessEnforcementWMO assumes that the only way to address a global or static
|
|
// property is via a formal begin_access. If we ever allow keypaths for static
|
|
// properties, which I think is conceivable, then this test will fail to produce
|
|
// a diagnostic error and AccessEnforcementWMO must be fixed to handle "meta"
|
|
// keypaths.
|
|
public class C {
|
|
public static var globalProp: Int = 0
|
|
}
|
|
|
|
public func testGlobalProp() {
|
|
let a: AnyKeyPath = \C.globalProp // expected-error{{static member 'globalProp' cannot be used on instance of type 'C'}}
|
|
}
|