addressed CR feedback

This commit is contained in:
Vladimir Matveev 2014-12-01 17:59:32 -08:00
parent 08ab517d52
commit ef6830054d

View File

@ -4379,8 +4379,8 @@ module ts {
function getNarrowedTypeOfSymbol(symbol: Symbol, node: Node) {
var type = getTypeOfSymbol(symbol);
// Only narrow when symbol is variable of a structured type
if (node && node.parent && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
loop: while (true) {
if (node && (symbol.flags & SymbolFlags.Variable && type.flags & TypeFlags.Structured)) {
loop: while (node.parent) {
var child = node;
node = node.parent;
var narrowedType = type;