mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Merge pull request #1240 from Microsoft/underscoreTS
Fix for findAllRefs on identifiers starting with 2+ underscores
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public [|_bar|]() { return 0; }
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x.[|_bar|];
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public [|__bar|]() { return 0; }
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x.[|__bar|];
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public [|___bar|]() { return 0; }
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x.[|___bar|];
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public [|____bar|]() { return 0; }
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x.[|____bar|];
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public _bar;
|
||||
//// public __bar;
|
||||
//// public [|___bar|];
|
||||
//// public ____bar;
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x._bar;
|
||||
////x.__bar;
|
||||
////x.[|___bar|];
|
||||
////x.____bar;
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,24 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////class Foo {
|
||||
//// public _bar;
|
||||
//// public [|__bar|];
|
||||
//// public ___bar;
|
||||
//// public ____bar;
|
||||
////}
|
||||
////
|
||||
////var x: Foo;
|
||||
////x._bar;
|
||||
////x.[|__bar|];
|
||||
////x.___bar;
|
||||
////x.____bar;
|
||||
|
||||
|
||||
test.ranges().forEach(r1 => {
|
||||
goTo.position(r1.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(r2 => {
|
||||
verify.referencesAtPositionContains(r2);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////function [|__foo|]() {
|
||||
//// [|__foo|]();
|
||||
////}
|
||||
|
||||
test.ranges().forEach(r => {
|
||||
goTo.position(r.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
verify.referencesAtPositionContains(range);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////(function [|__foo|]() {
|
||||
//// [|__foo|]();
|
||||
////})
|
||||
|
||||
test.ranges().forEach(r => {
|
||||
goTo.position(r.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
verify.referencesAtPositionContains(range);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////(function [|___foo|]() {
|
||||
//// [|___foo|]();
|
||||
////})
|
||||
|
||||
test.ranges().forEach(r => {
|
||||
goTo.position(r.start);
|
||||
verify.referencesCountIs(2);
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
verify.referencesAtPositionContains(range);
|
||||
});
|
||||
});
|
||||
@@ -1,9 +1,16 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////(function f/**/oo(): number {
|
||||
////(function [|foo|](): number {
|
||||
//// var x = [|foo|];
|
||||
//// return 0;
|
||||
////})
|
||||
|
||||
|
||||
goTo.marker();
|
||||
verify.occurrencesAtPositionCount(1);
|
||||
test.ranges().forEach(r => {
|
||||
goTo.position(r.start);
|
||||
verify.occurrencesAtPositionCount(2);
|
||||
|
||||
test.ranges().forEach(range => {
|
||||
verify.occurrencesAtPositionContains(range);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user