30 lines
No EOL
1.4 KiB
Text
30 lines
No EOL
1.4 KiB
Text
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected.
|
|
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected.
|
|
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected.
|
|
tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
|
|
|
|
==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (4 errors) ====
|
|
// Unary operator delete
|
|
var ANY;
|
|
|
|
// operand before delete operator
|
|
var BOOLEAN1 = ANY delete ; //expect error
|
|
~~~~~~
|
|
!!! error TS1005: ',' expected.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
// miss an operand
|
|
var BOOLEAN2 = delete ;
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
// delete global variable s
|
|
class testADelx {
|
|
constructor(public s: () => {}) {
|
|
delete s; //expect error
|
|
~
|
|
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
|
|
}
|
|
} |