* Add suggestion diagnostics for unused label and unreachable code * Always error on unused left hand side of comma
24 lines
No EOL
370 B
TypeScript
24 lines
No EOL
370 B
TypeScript
// @allowUnreachableCode: false
|
|
var ANY: any;
|
|
var BOOLEAN: boolean;
|
|
var NUMBER: number;
|
|
var STRING: string;
|
|
var OBJECT: Object;
|
|
|
|
// Expect to have compiler errors
|
|
// Missing the second operand
|
|
(ANY, );
|
|
(BOOLEAN, );
|
|
(NUMBER, );
|
|
(STRING, );
|
|
(OBJECT, );
|
|
|
|
// Missing the first operand
|
|
(, ANY);
|
|
(, BOOLEAN);
|
|
(, NUMBER);
|
|
(, STRING);
|
|
(, OBJECT);
|
|
|
|
// Missing all operands
|
|
( , ); |