Merge pull request #38415 from Kingwl/navTree-fix

Fix trancked es5 classes after new scope
This commit is contained in:
Nathan Shively-Sanders 2020-05-26 09:05:17 -07:00 committed by GitHub
commit 324d292e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -163,6 +163,7 @@ namespace ts.NavigationBar {
// Save the old parent
parentsStack.push(parent);
trackedEs5ClassesStack.push(trackedEs5Classes);
trackedEs5Classes = undefined;
parent = navNode;
}

View file

@ -0,0 +1,23 @@
/// <reference path="fourslash.ts"/>
//// function x(){
//// const x = Object()
//// x.foo = ""
//// }
verify.navigationTree({
"text": "<global>",
"kind": "script",
"childItems": [
{
"text": "x",
"kind": "function",
"childItems": [
{
"text": "x",
"kind": "const"
}
]
}
]
});