Skip to content

Commit 5e4a851

Browse files
Add repro test for issue #52912 nested array assignability
Agent-Logs-Url: https://github.com/RyanCavanaugh/TypeScript/sessions/dee5edef-e472-4317-8876-e1ca781fb3bf Co-authored-by: RyanCavanaugh <[email protected]>
1 parent f1a9288 commit 5e4a851

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

tests/cases/compiler/issue52912.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @strict: true
2+
3+
// Repro from #52912
4+
5+
type Source1 = { array: Source2[] };
6+
type Source2 = { array: Source3[] };
7+
type Source3 = { array: Source4[] };
8+
type Source4 = {};
9+
10+
type Target1 = { array: Target2[] };
11+
type Target2 = { array: Target3[] };
12+
type Target3 = { array: Target4[] };
13+
type Target4 = { someNewProperty: string };
14+
15+
declare const source1: Source1;
16+
declare const source2: Source2;
17+
declare const source3: Source3;
18+
declare const source4: Source4;
19+
20+
const target1: Target1 = source1; // Error
21+
const target2: Target2 = source2; // Error
22+
const target3: Target3 = source3; // Error
23+
const target4: Target4 = source4; // Error

0 commit comments

Comments
 (0)