If we are comparing left hand side for is position of type node, it is false, because it is namespace position and not type position

Fixes #837
This commit is contained in:
Sheetal Nandi
2014-11-10 19:19:33 -08:00
parent 04e2169f03
commit 57af2623c6
8 changed files with 18 additions and 11 deletions

View File

@@ -8467,7 +8467,7 @@ module ts {
// above them to find the lowest container
case SyntaxKind.Identifier:
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
if (node.parent.kind === SyntaxKind.QualifiedName) {
if (node.parent.kind === SyntaxKind.QualifiedName && (<QualifiedName>node.parent).right === node) {
node = node.parent;
}
// fall through