KeyPaths: Make references to let properties properly immutable.

This commit is contained in:
Joe Groff
2018-08-16 15:16:15 -07:00
parent 00b50ce6ab
commit 70c60e5186
9 changed files with 125 additions and 64 deletions

View File

@@ -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(),