mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fixed findAllRefs/getOccs bug where private properties declared in the constructor were only local to the constructor.
Fixes #975.
This commit is contained in:
@@ -766,7 +766,7 @@ module ts {
|
||||
}
|
||||
|
||||
export enum SymbolFlags {
|
||||
FunctionScopedVariable = 0x00000001, // Variable (var) or parameter
|
||||
FunctionScopedVariable = 0x00000001, // Variable (var) or parameter
|
||||
Property = 0x00000002, // Property or enum member
|
||||
EnumMember = 0x00000004, // Enum member
|
||||
Function = 0x00000008, // Function
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user