Revert assertion addition (#22622)

This commit is contained in:
Wesley Wigham
2018-03-16 09:04:55 -07:00
committed by GitHub
parent 19ec83fcdf
commit bfe755c6ce

View File

@@ -8017,8 +8017,7 @@ namespace ts {
function getLiteralTypeFromPropertyName(prop: Symbol) {
const links = getSymbolLinks(getLateBoundSymbol(prop));
if (!links.nameType) {
if (links.target && links.target !== unknownSymbol && links.target !== resolvingSymbol) {
Debug.assert(links.target.escapedName === prop.escapedName || links.target.escapedName === InternalSymbolName.Computed, "Target symbol and symbol do not have the same name");
if (links.target && links.target !== unknownSymbol && links.target !== resolvingSymbol && links.target.escapedName === prop.escapedName) {
links.nameType = getLiteralTypeFromPropertyName(links.target);
}
else {