* Add suggestion diagnostics for unused label and unreachable code * Always error on unused left hand side of comma
15 lines
309 B
TypeScript
15 lines
309 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
/////* a */[|label|]/* b */:/* c */while (1) {}
|
|
|
|
verify.getSuggestionDiagnostics([{
|
|
message: "Unused label.",
|
|
code: 7028,
|
|
reportsUnnecessary: true,
|
|
}]);
|
|
|
|
verify.codeFix({
|
|
description: "Remove unused label",
|
|
newFileContent:
|
|
`/* a */while (1) {}`,
|
|
});
|