Fix tranced es5 classes after new scope

This commit is contained in:
kingwl 2020-05-08 17:34:41 +08:00
parent 7ac641d6a4
commit 6f4deaea78
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"
}
]
}
]
});