Skip to content

Commit 93c3a30

Browse files
authored
Add assertion on invalid cache set (microsoft#43845)
1 parent d1fa945 commit 93c3a30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/checker.ts

+3
Original file line numberDiff line numberDiff line change
@@ -32190,6 +32190,9 @@ namespace ts {
3219032190
assignBindingElementTypes(declaration.name, links.type);
3219132191
}
3219232192
}
32193+
else if (type) {
32194+
Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type");
32195+
}
3219332196
}
3219432197

3219532198
// When contextual typing assigns a type to a parameter that contains a binding pattern, we also need to push

0 commit comments

Comments
 (0)