-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed crash in go to definition related to expando classes in JS files (
- Loading branch information
Showing
5 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/baselines/reference/goToDefinitionExpandoClass1.baseline.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// === goToDefinition === | ||
// === /tests/cases/fourslash/index.js === | ||
// const Core = {} | ||
// | ||
// <|Core.[|Test|]|> = class { } | ||
// | ||
// Core.Test.prototype.foo = 10 | ||
// | ||
// new Core.Tes/*GOTO DEF*/t() | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"kind": "property", | ||
"name": "Test", | ||
"containerName": "Core", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
} | ||
] |
35 changes: 35 additions & 0 deletions
35
tests/baselines/reference/goToDefinitionExpandoClass2.baseline.jsonc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// === goToDefinition === | ||
// === /tests/cases/fourslash/index.js === | ||
// const Core = {} | ||
// | ||
// <|Core.[|{| defId: 0 |}Test|]|> = class { | ||
// [|{| defId: 1 |}constructor() { }|] | ||
// } | ||
// | ||
// Core.Test.prototype.foo = 10 | ||
// | ||
// new Core.Tes/*GOTO DEF*/t() | ||
|
||
// === Details === | ||
[ | ||
{ | ||
"defId": 0, | ||
"kind": "property", | ||
"name": "Test", | ||
"containerName": "Core", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
}, | ||
{ | ||
"defId": 1, | ||
"kind": "constructor", | ||
"name": "__constructor", | ||
"containerName": "Test", | ||
"isLocal": true, | ||
"isAmbient": false, | ||
"unverified": false, | ||
"failedAliasResolution": false | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @strict: true | ||
// @allowJs: true | ||
// @checkJs: true | ||
|
||
// @filename: index.js | ||
|
||
//// const Core = {} | ||
//// | ||
//// Core.Test = class { } | ||
//// | ||
//// Core.Test.prototype.foo = 10 | ||
//// | ||
//// new Core.Tes/*1*/t() | ||
|
||
verify.baselineGoToDefinition("1"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @strict: true | ||
// @allowJs: true | ||
// @checkJs: true | ||
|
||
// @filename: index.js | ||
|
||
//// const Core = {} | ||
//// | ||
//// Core.Test = class { | ||
//// constructor() { } | ||
//// } | ||
//// | ||
//// Core.Test.prototype.foo = 10 | ||
//// | ||
//// new Core.Tes/*1*/t() | ||
|
||
verify.baselineGoToDefinition("1"); |