Add assertion on invalid cache set (#43845)

This commit is contained in:
Wesley Wigham
2022-03-11 10:57:22 -08:00
committed by GitHub
parent d1fa945261
commit 93c3a30edc

View File

@@ -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