diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 78fd663bbb9..ccd4a50b379 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -32190,6 +32190,9 @@ namespace ts { assignBindingElementTypes(declaration.name, links.type); } } + else if (type) { + Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type"); + } } // When contextual typing assigns a type to a parameter that contains a binding pattern, we also need to push