File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ namespace ts {
62
62
let x = [#|t + 1|];
63
63
}` ) ;
64
64
65
+ // TODO (acasey): handle repeated substitution
66
+ // testExtractConstant("extractConstant_RepeatedSubstitution",
67
+ // `namespace X {
68
+ // export const j = 10;
69
+ // export const y = [#|j * j|];
70
+ // }`);
71
+
65
72
testExtractConstantFailed ( "extractConstant_BlockScopes_Dependencies" ,
66
73
`for (let i = 0; i < 10; i++) {
67
74
for (let j = 0; j < 10; j++) {
Original file line number Diff line number Diff line change @@ -364,6 +364,13 @@ function parsePrimaryExpression(): any {
364
364
`function F() {
365
365
[#|function G() { }|]
366
366
}` ) ;
367
+
368
+ // TODO (acasey): handle repeated substitution
369
+ // testExtractMethod("extractMethod_RepeatedSubstitution",
370
+ // `namespace X {
371
+ // export const j = 10;
372
+ // export const y = [#|j * j|];
373
+ // }`);
367
374
} ) ;
368
375
369
376
function testExtractMethod ( caption : string , text : string ) {
Original file line number Diff line number Diff line change @@ -1382,9 +1382,9 @@ namespace ts.refactor.extractSymbol {
1382
1382
if ( symbolId ) {
1383
1383
for ( let i = 0 ; i < scopes . length ; i ++ ) {
1384
1384
// push substitution from map<symbolId, subst> to map<nodeId, subst> to simplify rewriting
1385
- const substitition = substitutionsPerScope [ i ] . get ( symbolId ) ;
1386
- if ( substitition ) {
1387
- usagesPerScope [ i ] . substitutions . set ( getNodeId ( n ) . toString ( ) , substitition ) ;
1385
+ const substitution = substitutionsPerScope [ i ] . get ( symbolId ) ;
1386
+ if ( substitution ) {
1387
+ usagesPerScope [ i ] . substitutions . set ( getNodeId ( n ) . toString ( ) , substitution ) ;
1388
1388
}
1389
1389
}
1390
1390
}
You can’t perform that action at this time.
0 commit comments