Merge pull request #12898 from Microsoft/NavigateToFixForIIFE

NavigateTo is not working correctly for declarations in IIFEs
This commit is contained in:
jramsay
2016-12-14 10:56:44 -08:00
committed by GitHub
2 changed files with 20 additions and 2 deletions

View File

@@ -592,9 +592,8 @@ namespace ts {
else {
declarations.push(functionDeclaration);
}
forEachChild(node, visit);
}
forEachChild(node, visit);
break;
case SyntaxKind.ClassDeclaration:

View File

@@ -0,0 +1,19 @@
/// <reference path="fourslash.ts" />
// @Filename: file1.ts
/////*1*/(function () {
//// "use strict";
//// function onResume() {
//// };
////} )();
// @Filename: file2.ts
/////*2*/class EventManager {
//// public onResume(name: string) { }
////}
////class MyOtherEventManager {
//// public onResume(name: string) { }
////}
verify.navigationItemsListCount(3, "onResume");
verify.navigationItemsListCount(1, "onResume", undefined, test.marker("1").fileName);
verify.navigationItemsListContains("onResume", "function", "onResume", "exact", test.marker("1").fileName);
verify.navigationItemsListCount(2, "onResume", undefined, test.marker("2").fileName);