Files
swift-mirror/test/stdlib/Inputs/KeyPathMultiFile_b.swift
Joe Groff ae4d40ac85 SILGen: Fix key paths that reference internal private(set) decls from other files.
The setter needs to be given hidden linkage so that other files can still form key paths to it.
2018-07-25 10:49:29 -07:00

20 lines
298 B
Swift

struct A {
private(set) var x: Int {
get { return 0 }
set {}
}
private(set) subscript(x: Int) -> Int {
get { return 0 }
set {}
}
}
func A_x_keypath() -> WritableKeyPath<A, Int> {
return \A.x
}
func A_subscript_0_keypath() -> WritableKeyPath<A, Int> {
return \A.[0]
}