Files
swift-mirror/test/stdlib/KeyPathMultiFile.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

16 lines
425 B
Swift

// RUN: %empty-directory(%t)
// RUN: cp %s %t/main.swift
// RUN: %target-build-swift -o %t/a.out %t/main.swift %S/Inputs/KeyPathMultiFile_b.swift
// RUN: %target-run %t/a.out
import StdlibUnittest
var keyPathMultiFile = TestSuite("key paths across multiple files")
keyPathMultiFile.test("identity across multiple files") {
expectEqual(A_x_keypath(), \A.x)
expectEqual(A_subscript_0_keypath(), \A.[0])
}
runAllTests()