diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f4ee7960f1074..6655b32fad392 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -30395,6 +30395,9 @@ namespace ts { assignBindingElementTypes(declaration.name); } } + 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