2017-08-02 15:51:26 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
////class Test {
|
2019-06-13 21:25:02 +02:00
|
|
|
//// [|get [|{| "isDefinition": true, "isWriteAccess": true, "contextRangeIndex": 0 |}x|]() { return 0; }|]
|
2017-08-02 15:51:26 +02:00
|
|
|
////
|
2019-06-13 21:25:02 +02:00
|
|
|
//// [|set [|{| "isDefinition": true, "isWriteAccess": true, "contextRangeIndex": 2 |}y|](a: number) {}|]
|
2017-08-02 15:51:26 +02:00
|
|
|
////}
|
2019-06-13 21:25:02 +02:00
|
|
|
////[|const { [|{| "isDefinition": true, "isWriteAccess": true, "contextRangeIndex": 4 |}x|], [|{| "isDefinition": true, "isWriteAccess": true, "contextRangeIndex": 4 |}y|] } = new Test();|]
|
2017-08-02 15:51:26 +02:00
|
|
|
////[|x|]; [|y|];
|
|
|
|
|
2019-06-06 18:49:31 +02:00
|
|
|
const [x0Def, x0, y0Def, y0, xy1Def, x1, y1, x2, y2] = test.ranges();
|
2018-09-27 01:58:01 +02:00
|
|
|
verify.referenceGroups(x0, [{ definition: "(property) Test.x: number", ranges: [x0, x1] }]);
|
|
|
|
verify.referenceGroups(x1, [
|
2017-08-02 15:51:26 +02:00
|
|
|
{ definition: "(property) Test.x: number", ranges: [x0] },
|
|
|
|
{ definition: "const x: number", ranges: [x1, x2] },
|
|
|
|
]);
|
2018-09-27 01:58:01 +02:00
|
|
|
verify.referenceGroups(x2, [{ definition: "const x: number", ranges: [x1, x2] }]);
|
2017-08-02 15:51:26 +02:00
|
|
|
|
2018-09-27 01:58:01 +02:00
|
|
|
verify.referenceGroups(y0, [{ definition: "(property) Test.y: number", ranges: [y0, y1] }]);
|
|
|
|
verify.referenceGroups(y1, [
|
2017-08-02 15:51:26 +02:00
|
|
|
{ definition: "(property) Test.y: number", ranges: [y0] },
|
|
|
|
{ definition: "const y: number", ranges: [y1, y2] },
|
|
|
|
]);
|
2018-09-27 01:58:01 +02:00
|
|
|
verify.referenceGroups(y2, [{ definition: "const y: number", ranges: [y1, y2] }]);
|