File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -3571,8 +3571,22 @@ module ts {
35713571 }
35723572 }
35733573
3574- /// References and Occurrences
35753574 function getOccurrencesAtPosition ( fileName : string , position : number ) : ReferenceEntry [ ] {
3575+ let results = getOccurrencesAtPositionCore ( fileName , position ) ;
3576+
3577+ let sourceFile = getCanonicalFileName ( normalizeSlashes ( fileName ) ) ;
3578+
3579+ // ensure the results are in the file we're interested in
3580+ results . forEach ( ( value ) => {
3581+ let targetFile = getCanonicalFileName ( normalizeSlashes ( value . fileName ) ) ;
3582+ Debug . assert ( sourceFile == targetFile , `Unexpected file in results. Found results in ${ targetFile } expected only results in ${ sourceFile } .` ) ;
3583+ } ) ;
3584+
3585+ return results ;
3586+ }
3587+
3588+ /// References and Occurrences
3589+ function getOccurrencesAtPositionCore ( fileName : string , position : number ) : ReferenceEntry [ ] {
35763590 synchronizeHostData ( ) ;
35773591
35783592 let sourceFile = getValidSourceFile ( fileName ) ;
You can’t perform that action at this time.
0 commit comments