diff --git a/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts b/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts index 587ec1c9d7e..7acacd6c1d7 100644 --- a/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts +++ b/tests/cases/conformance/types/mapped/mappedTypeRelationships.ts @@ -69,14 +69,16 @@ function f23(x: T, y: Readonly, k: K) { y[k] = x[k]; // Error } +type Thing = { a: string, b: string }; + function f30(x: T, y: Partial) { x = y; // Error y = x; } -function f31(x: T, y: Partial) { - x = y; // Error - y = x; +function f31(x: Partial, y: Partial) { + x = y; + y = x; // Error } function f40(x: T, y: Readonly) { @@ -84,9 +86,9 @@ function f40(x: T, y: Readonly) { y = x; } -function f41(x: T, y: Readonly) { +function f41(x: Readonly, y: Readonly) { x = y; - y = x; + y = x; // Error } type Item = {