@@ -2219,6 +2219,11 @@ module ts {
22192219 return getLoopBreakContinueOccurrences ( < IterationStatement > node . parent ) ;
22202220 }
22212221 break ;
2222+ case SyntaxKind . ConstructorKeyword :
2223+ if ( hasKind ( node . parent , SyntaxKind . Constructor ) ) {
2224+ return getConstructorOccurrences ( < ConstructorDeclaration > node . parent ) ;
2225+ }
2226+ break ;
22222227 }
22232228
22242229 return undefined ;
@@ -2283,7 +2288,7 @@ module ts {
22832288 return result ;
22842289 }
22852290
2286- function getReturnOccurrences ( returnStatement : ReturnStatement ) : ReferenceEntry [ ] {
2291+ function getReturnOccurrences ( returnStatement : ReturnStatement ) : ReferenceEntry [ ] {
22872292 var func = < FunctionDeclaration > getContainingFunction ( returnStatement ) ;
22882293
22892294 // If we didn't find a containing function with a block body, bail out.
@@ -2435,6 +2440,20 @@ module ts {
24352440 return undefined ;
24362441 }
24372442
2443+ function getConstructorOccurrences ( constructorDeclaration : ConstructorDeclaration ) : ReferenceEntry [ ] {
2444+ var declarations = constructorDeclaration . symbol . getDeclarations ( )
2445+
2446+ var keywords : Node [ ] = [ ] ;
2447+
2448+ forEach ( declarations , declaration => {
2449+ forEach ( declaration . getChildren ( ) , token => {
2450+ return pushKeywordIf ( keywords , token , SyntaxKind . ConstructorKeyword ) ;
2451+ } ) ;
2452+ } ) ;
2453+
2454+ return map ( keywords , getReferenceEntryFromNode ) ;
2455+ }
2456+
24382457 // returns true if 'node' is defined and has a matching 'kind'.
24392458 function hasKind ( node : Node , kind : SyntaxKind ) {
24402459 return node !== undefined && node . kind === kind ;
0 commit comments