From ec2aecf90e0091f94c50754918cb2c67fe95c300 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sun, 29 Oct 2017 16:49:43 -0700 Subject: [PATCH] Add tests --- .../types/mapped/mappedTypeRelationships.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts b/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts index 7acacd6c1d7..9e8639bbb9e 100644 --- a/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts +++ b/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts @@ -170,3 +170,15 @@ function f76(x: { [P in K]: T[P] }, y: { [P i x = y; y = x; // Error } + +function f80(t: T): Partial { + return t; +} + +function f81(t: T, k: K): Partial { + return t[k]; +} + +function f82(t: T, k1: K1, k2: K2): Partial { + return t[k1][k2]; +}