KeyPaths: Handle computed property descriptor instantiation w/o indexes or generics.

This commit is contained in:
Joe Groff
2018-07-18 10:19:47 -07:00
parent e96472807f
commit 3b9501a283
3 changed files with 177 additions and 43 deletions

View File

@@ -18,6 +18,8 @@ var keyPathMultiModule = TestSuite("key paths across multiple modules")
keyPathMultiModule.test("identity across multiple modules") {
expectEqual(A_x_keypath(), \A.x)
expectEqual(A_y_keypath(), \A.y)
expectEqual(A_z_keypath(), \A.z)
expectEqual(A_subscript_withGeneric_keypath(index: 0), \A.[withGeneric: 0])
expectEqual(A_subscript_withGeneric_keypath(index: "butt"),
\A.[withGeneric: "butt"])