File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,15 @@ namespace A {
565
565
}
566
566
}
567
567
}
568
+ }` ) ;
569
+ // This test is descriptive, rather than normative. The current implementation
570
+ // doesn't handle type parameter shadowing.
571
+ testExtractMethod ( "extractMethod14" ,
572
+ `function F<T>(t1: T) {
573
+ function F<T>(t2: T) {
574
+ [#|t1.toString();
575
+ t2.toString();|]
576
+ }
568
577
}` ) ;
569
578
} ) ;
570
579
Original file line number Diff line number Diff line change
1
+ // ==ORIGINAL==
2
+ function F < T > ( t1 : T ) {
3
+ function F < T > ( t2 : T ) {
4
+ t1 . toString ( ) ;
5
+ t2 . toString ( ) ;
6
+ }
7
+ }
8
+ // ==SCOPE::function 'F'==
9
+ function F < T > ( t1 : T ) {
10
+ function F < T > ( t2 : T ) {
11
+ newFunction ( ) ;
12
+
13
+ function newFunction ( ) {
14
+ t1 . toString ( ) ;
15
+ t2 . toString ( ) ;
16
+ }
17
+ }
18
+ }
19
+ // ==SCOPE::function 'F'==
20
+ function F < T > ( t1 : T ) {
21
+ function F < T > ( t2 : T ) {
22
+ newFunction < T > ( t2 ) ;
23
+ }
24
+
25
+ function newFunction < T > ( t2 : T ) {
26
+ t1 . toString ( ) ;
27
+ t2 . toString ( ) ;
28
+ }
29
+ }
30
+ // ==SCOPE::global scope==
31
+ function F < T > ( t1 : T ) {
32
+ function F < T > ( t2 : T ) {
33
+ newFunction < T , T > ( t1 , t2 ) ;
34
+ }
35
+ }
36
+ function newFunction < T , T > ( t1 : T , t2 : T ) {
37
+ t1 . toString ( ) ;
38
+ t2 . toString ( ) ;
39
+ }
You can’t perform that action at this time.
0 commit comments