File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -411,6 +411,12 @@ switch (x) {
411
411
refactor . extractSymbol . Messages . cannotExtractRange . message
412
412
] ) ;
413
413
414
+ testExtractRangeFailed ( "extractRangeFailed18" ,
415
+ `[#|{ 1;|] }` ,
416
+ [
417
+ refactor . extractSymbol . Messages . cannotExtractRange . message
418
+ ] ) ;
419
+
414
420
testExtractRangeFailed ( "extract-method-not-for-token-expression-statement" , `[#|a|]` , [ refactor . extractSymbol . Messages . cannotExtractIdentifier . message ] ) ;
415
421
} ) ;
416
422
}
Original file line number Diff line number Diff line change @@ -242,7 +242,6 @@ namespace ts.refactor.extractSymbol {
242
242
// they will never find `start` in `start.parent.statements`.
243
243
// Consider: We could support ranges like [|case 1:|] by refining them to just
244
244
// the expression.
245
- Debug . assert ( isCaseClause ( start . parent ) && span . start < start . parent . expression . end ) ;
246
245
return { errors : [ createFileDiagnostic ( sourceFile , span . start , length , Messages . cannotExtractRange ) ] } ;
247
246
}
248
247
You can’t perform that action at this time.
0 commit comments