Update LKG

This commit is contained in:
Mohamed Hegazy 2015-11-02 13:26:10 -08:00
parent c5e611891b
commit 9b84247469
4 changed files with 48 additions and 40 deletions

View File

@ -4768,6 +4768,15 @@ var ts;
return !!node && (node.kind === 162 || node.kind === 161);
}
ts.isBindingPattern = isBindingPattern;
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
ts.isNodeDescendentOf = isNodeDescendentOf;
function isInAmbientContext(node) {
while (node) {
if (node.flags & (2 | 8192)) {
@ -13966,7 +13975,8 @@ var ts;
var container = ts.getThisContainer(node, false);
var parent = container && container.parent;
if (parent && (ts.isClassLike(parent) || parent.kind === 215)) {
if (!(container.flags & 128)) {
if (!(container.flags & 128) &&
(container.kind !== 144 || ts.isNodeDescendentOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@ -24351,16 +24361,8 @@ var ts;
diagnostics: diagnostics,
sourceMaps: sourceMapDataList
};
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
function isUniqueLocalName(name, container) {
for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
for (var node = container; ts.isNodeDescendentOf(node, container); node = node.nextContainer) {
if (node.locals && ts.hasProperty(node.locals, name)) {
if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
return false;

View File

@ -4501,6 +4501,15 @@ var ts;
return !!node && (node.kind === 162 || node.kind === 161);
}
ts.isBindingPattern = isBindingPattern;
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
ts.isNodeDescendentOf = isNodeDescendentOf;
function isInAmbientContext(node) {
while (node) {
if (node.flags & (2 | 8192)) {
@ -14429,7 +14438,8 @@ var ts;
var container = ts.getThisContainer(node, false);
var parent = container && container.parent;
if (parent && (ts.isClassLike(parent) || parent.kind === 215)) {
if (!(container.flags & 128)) {
if (!(container.flags & 128) &&
(container.kind !== 144 || ts.isNodeDescendentOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@ -24814,16 +24824,8 @@ var ts;
diagnostics: diagnostics,
sourceMaps: sourceMapDataList
};
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
function isUniqueLocalName(name, container) {
for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
for (var node = container; ts.isNodeDescendentOf(node, container); node = node.nextContainer) {
if (node.locals && ts.hasProperty(node.locals, name)) {
if (node.locals[name].flags & (107455 | 1048576 | 8388608)) {
return false;

View File

@ -6189,6 +6189,15 @@ var ts;
return !!node && (node.kind === 162 /* ArrayBindingPattern */ || node.kind === 161 /* ObjectBindingPattern */);
}
ts.isBindingPattern = isBindingPattern;
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
ts.isNodeDescendentOf = isNodeDescendentOf;
function isInAmbientContext(node) {
while (node) {
if (node.flags & (2 /* Ambient */ | 8192 /* DeclarationFile */)) {
@ -17284,7 +17293,8 @@ var ts;
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
var parent = container && container.parent;
if (parent && (ts.isClassLike(parent) || parent.kind === 215 /* InterfaceDeclaration */)) {
if (!(container.flags & 128 /* Static */)) {
if (!(container.flags & 128 /* Static */) &&
(container.kind !== 144 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@ -29492,16 +29502,8 @@ var ts;
diagnostics: diagnostics,
sourceMaps: sourceMapDataList
};
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
function isUniqueLocalName(name, container) {
for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
for (var node = container; ts.isNodeDescendentOf(node, container); node = node.nextContainer) {
if (node.locals && ts.hasProperty(node.locals, name)) {
// We conservatively include alias symbols to cover cases where they're emitted as locals
if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {

View File

@ -6189,6 +6189,15 @@ var ts;
return !!node && (node.kind === 162 /* ArrayBindingPattern */ || node.kind === 161 /* ObjectBindingPattern */);
}
ts.isBindingPattern = isBindingPattern;
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
ts.isNodeDescendentOf = isNodeDescendentOf;
function isInAmbientContext(node) {
while (node) {
if (node.flags & (2 /* Ambient */ | 8192 /* DeclarationFile */)) {
@ -17284,7 +17293,8 @@ var ts;
var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
var parent = container && container.parent;
if (parent && (ts.isClassLike(parent) || parent.kind === 215 /* InterfaceDeclaration */)) {
if (!(container.flags & 128 /* Static */)) {
if (!(container.flags & 128 /* Static */) &&
(container.kind !== 144 /* Constructor */ || ts.isNodeDescendentOf(node, container.body))) {
return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
}
}
@ -29492,16 +29502,8 @@ var ts;
diagnostics: diagnostics,
sourceMaps: sourceMapDataList
};
function isNodeDescendentOf(node, ancestor) {
while (node) {
if (node === ancestor)
return true;
node = node.parent;
}
return false;
}
function isUniqueLocalName(name, container) {
for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
for (var node = container; ts.isNodeDescendentOf(node, container); node = node.nextContainer) {
if (node.locals && ts.hasProperty(node.locals, name)) {
// We conservatively include alias symbols to cover cases where they're emitted as locals
if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) {