mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
KeyPaths: Make references to let properties properly immutable.
This commit is contained in:
@@ -52,6 +52,7 @@ keyPathMultiModule.test("identity across multiple modules") {
|
||||
expectEqualWithHashes(A_x_keypath(), \A.x)
|
||||
expectEqualWithHashes(A_y_keypath(), \A.y)
|
||||
expectEqualWithHashes(A_z_keypath(), \A.z)
|
||||
expectEqualWithHashes(A_immutable_keypath(), \A.immutable)
|
||||
expectEqualWithHashes(A_subscript_withGeneric_keypath(index: 0), \A.[withGeneric: 0])
|
||||
expectEqualWithHashes(A_subscript_withGeneric_keypath(index: "butt"),
|
||||
\A.[withGeneric: "butt"])
|
||||
@@ -156,6 +157,8 @@ keyPathMultiModule.test("identity across multiple modules") {
|
||||
\ResilientRoot.storedA)
|
||||
expectEqualWithHashes(ResilientRoot_storedB_keypath(),
|
||||
\ResilientRoot.storedB)
|
||||
expectEqualWithHashes(ResilientRoot_storedLet_keypath(),
|
||||
\ResilientRoot.storedLet)
|
||||
expectEqualWithHashes(ResilientRoot_virtual_keypath(),
|
||||
\ResilientRoot.virtual)
|
||||
expectEqualWithHashes(ResilientRoot_virtualRO_keypath(),
|
||||
|
||||
Reference in New Issue
Block a user