Fixed findAllRefs/getOccs bug where private properties declared in the constructor were only local to the constructor.

Fixes #975.
This commit is contained in:
Daniel Rosenwasser committed 2014-10-27 18:08:49 -07:00
1 parent 20392de6ef
commit e3d82b7db3
3 files changed
+20 -2

No files matched your search

+1 -1
View File
@@ -3836,7 +3836,7 @@ module ts {
if (symbol.getFlags() && (SymbolFlags.Property | SymbolFlags.Method)) {
var privateDeclaration = forEach(symbol.getDeclarations(), d => (d.flags & NodeFlags.Private) ? d : undefined);
if (privateDeclaration) {
return privateDeclaration.parent;
return getAncestor(privateDeclaration, SyntaxKind.ClassDeclaration);
}
}