avoid removing comments when removing unused locals

This commit is contained in:
zhengbli
2017-02-02 13:50:34 -08:00
parent 12e8f91bf2
commit 62f716aaa6
3 changed files with 36 additions and 18 deletions

View File

@@ -2,9 +2,11 @@
// @noUnusedLocals: true
//// [| namespace greeter {
//// // some legit comments
//// function function1() {
//// }/*1*/
//// } |]
verify.rangeAfterCodeFix(`namespace greeter {
// some legit comments
}`);

View File

@@ -2,7 +2,7 @@
// @noUnusedLocals: true
// @Filename: file2.ts
////[| import {Calculator, test, test2} from "./file1" |]
////[| import {Calculator, /*some comments*/ test, test2} from "./file1" |]
//// test();
//// test2();
@@ -20,5 +20,5 @@
////
//// }
verify.rangeAfterCodeFix(`import {test, test2} from "./file1"`);
verify.rangeAfterCodeFix(`import {/*some comments*/ test, test2} from "./file1"`);