Skip to content

Commit bb4e4d6

Browse files
author
Andy Hanson
committed
Always error on unused left hand side of comma
1 parent ad620b8 commit bb4e4d6

File tree

53 files changed

+1113
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1113
-50
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20315,8 +20315,8 @@ namespace ts {
2031520315
checkAssignmentOperator(rightType);
2031620316
return getRegularTypeOfObjectLiteral(rightType);
2031720317
case SyntaxKind.CommaToken:
20318-
if (isSideEffectFree(left) && !isEvalNode(right) && !compilerOptions.allowUnreachableCode) {
20319-
errorOrSuggestion(unreachableCodeIsError(compilerOptions), left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
20318+
if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) {
20319+
error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects);
2032020320
}
2032120321
return rightType;
2032220322
}
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2304: Cannot find name 'Foo'.
2+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects.
3+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,1): error TS2695: Left side of comma operator is unused and has no side effects.
24
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,5): error TS2304: Cannot find name 'A'.
35
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,7): error TS2304: Cannot find name 'B'.
46
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,9): error TS1127: Invalid character.
57
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,11): error TS2304: Cannot find name 'C'.
8+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects.
9+
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts(1,14): error TS2695: Left side of comma operator is unused and has no side effects.
610

711

8-
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (5 errors) ====
12+
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/TypeArgumentLists/TypeArgumentList1.ts (9 errors) ====
913
Foo<A,B,\ C>(4, 5, 6);
1014
~~~
1115
!!! error TS2304: Cannot find name 'Foo'.
16+
~~~~~
17+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
18+
~~~~~~~
19+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
1220
~
1321
!!! error TS2304: Cannot find name 'A'.
1422
~
1523
!!! error TS2304: Cannot find name 'B'.
1624

1725
!!! error TS1127: Invalid character.
1826
~
19-
!!! error TS2304: Cannot find name 'C'.
27+
!!! error TS2304: Cannot find name 'C'.
28+
~
29+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
30+
~~~~
31+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
tests/cases/compiler/assignmentToParenthesizedExpression1.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
2+
tests/cases/compiler/assignmentToParenthesizedExpression1.ts(2,2): error TS2695: Left side of comma operator is unused and has no side effects.
23

34

4-
==== tests/cases/compiler/assignmentToParenthesizedExpression1.ts (1 errors) ====
5+
==== tests/cases/compiler/assignmentToParenthesizedExpression1.ts (2 errors) ====
56
var x;
67
(1, x)=0;
78
~~~~~~
8-
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
9+
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
10+
~
11+
!!! error TS2695: Left side of comma operator is unused and has no side effects.

tests/baselines/reference/destructuringParameterDeclaration6.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected.
22
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,14): error TS1181: Array element destructuring pattern expected.
3+
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,19): error TS2695: Left side of comma operator is unused and has no side effects.
34
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,19): error TS1005: '(' expected.
45
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,21): error TS1109: Expression expected.
6+
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,24): error TS2695: Left side of comma operator is unused and has no side effects.
57
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,24): error TS1005: '(' expected.
68
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,26): error TS2304: Cannot find name 'public'.
79
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(9,32): error TS1005: ';' expected.
@@ -11,7 +13,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(
1113
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(12,13): error TS2370: A rest parameter must be of an array type.
1214

1315

14-
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts (11 errors) ====
16+
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts (13 errors) ====
1517
// A parameter declaration may specify either an identifier or a binding pattern.
1618

1719
// Reserved words are not allowed to be used as an identifier in parameter declaration
@@ -25,10 +27,14 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts(
2527
function a4([while, for, public]){ }
2628
~~~~~
2729
!!! error TS1181: Array element destructuring pattern expected.
30+
31+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
2832
~
2933
!!! error TS1005: '(' expected.
3034
~~~
3135
!!! error TS1109: Expression expected.
36+
37+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
3238
~
3339
!!! error TS1005: '(' expected.
3440
~~~~~~

tests/baselines/reference/fatarrowfunctionsOptionalArgsErrors2.errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,12): error TS2304: Cannot find name 'a'.
2+
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,12): error TS2695: Left side of comma operator is unused and has no side effects.
23
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,16): error TS2304: Cannot find name 'b'.
4+
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,16): error TS2695: Left side of comma operator is unused and has no side effects.
35
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,19): error TS2304: Cannot find name 'c'.
46
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,23): error TS1005: ';' expected.
57
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,26): error TS2304: Cannot find name 'a'.
68
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,28): error TS2304: Cannot find name 'b'.
79
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(1,30): error TS2304: Cannot find name 'c'.
10+
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,12): error TS2695: Left side of comma operator is unused and has no side effects.
11+
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,12): error TS2695: Left side of comma operator is unused and has no side effects.
812
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,13): error TS2304: Cannot find name 'a'.
913
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,17): error TS2304: Cannot find name 'b'.
1014
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(2,20): error TS2304: Cannot find name 'c'.
@@ -17,12 +21,16 @@ tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,17): error TS1005
1721
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,20): error TS2304: Cannot find name 'a'.
1822

1923

20-
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts (17 errors) ====
24+
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts (21 errors) ====
2125
var tt1 = (a, (b, c)) => a+b+c;
2226
~
2327
!!! error TS2304: Cannot find name 'a'.
28+
~
29+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
2430
~
2531
!!! error TS2304: Cannot find name 'b'.
32+
~
33+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
2634
~
2735
!!! error TS2304: Cannot find name 'c'.
2836
~~
@@ -34,6 +42,10 @@ tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors2.ts(4,20): error TS2304
3442
~
3543
!!! error TS2304: Cannot find name 'c'.
3644
var tt2 = ((a), b, c) => a+b+c;
45+
~~~
46+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
47+
~~~~~~
48+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
3749
~
3850
!!! error TS2304: Cannot find name 'a'.
3951
~

tests/baselines/reference/invalidLetInForOfAndForIn_ES5.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,13): error TS1005: ',' expected.
22
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,14): error TS1181: Array element destructuring pattern expected.
3+
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,14): error TS2695: Left side of comma operator is unused and has no side effects.
4+
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,14): error TS2695: Left side of comma operator is unused and has no side effects.
35
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,19): error TS1005: ';' expected.
46
tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,20): error TS1128: Declaration or statement expected.
57

68

7-
==== tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts (4 errors) ====
9+
==== tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts (6 errors) ====
810
// This should be an error
911
// More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements
1012

@@ -14,6 +16,10 @@ tests/cases/compiler/invalidLetInForOfAndForIn_ES5.ts(5,20): error TS1128: Decla
1416
!!! error TS1005: ',' expected.
1517
~
1618
!!! error TS1181: Array element destructuring pattern expected.
19+
~
20+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
21+
~~~
22+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
1723
~
1824
!!! error TS1005: ';' expected.
1925
~

tests/baselines/reference/invalidLetInForOfAndForIn_ES6.errors.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,13): error TS1005: ',' expected.
22
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,14): error TS1181: Array element destructuring pattern expected.
3+
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,14): error TS2695: Left side of comma operator is unused and has no side effects.
4+
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,14): error TS2695: Left side of comma operator is unused and has no side effects.
35
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,19): error TS1005: ';' expected.
46
tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,20): error TS1128: Declaration or statement expected.
57

68

7-
==== tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts (4 errors) ====
9+
==== tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts (6 errors) ====
810
// This should be an error
911
// More details: http://www.ecma-international.org/ecma-262/6.0/#sec-iteration-statements
1012

@@ -14,6 +16,10 @@ tests/cases/compiler/invalidLetInForOfAndForIn_ES6.ts(5,20): error TS1128: Decla
1416
!!! error TS1005: ',' expected.
1517
~
1618
!!! error TS1181: Array element destructuring pattern expected.
19+
~
20+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
21+
~~~
22+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
1723
~
1824
!!! error TS1005: ';' expected.
1925
~

tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,1): error TS2695: Left side of comma operator is unused and has no side effects.
12
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,17): error TS1005: '{' expected.
23
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,23): error TS2304: Cannot find name 'right'.
34
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,23): error TS2657: JSX expressions must have one parent element.
45
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,57): error TS1109: Expression expected.
56
tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,58): error TS1109: Expression expected.
67

78

8-
==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (5 errors) ====
9+
==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (6 errors) ====
910
declare var React: any;
1011
declare var 日本語;
1112
declare var AbC_def;
@@ -45,6 +46,8 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,58): error TS1109: Expr
4546
<div><br />7x invalid-js-identifier</div>;
4647

4748
<LeftRight left=<a /> right=<b>monkeys /> gorillas</b> />;
49+
~~~~~~~~~~~~~~~~
50+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
4851
~
4952
!!! error TS1005: '{' expected.
5053
~~~~~

tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ tests/cases/conformance/jsx/16.tsx(1,2): error TS17008: JSX element 'a' has no c
3333
tests/cases/conformance/jsx/16.tsx(1,10): error TS1005: '</' expected.
3434
tests/cases/conformance/jsx/17.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag.
3535
tests/cases/conformance/jsx/17.tsx(1,10): error TS1005: '</' expected.
36+
tests/cases/conformance/jsx/18.tsx(1,9): error TS2695: Left side of comma operator is unused and has no side effects.
3637
tests/cases/conformance/jsx/18.tsx(1,37): error TS2657: JSX expressions must have one parent element.
38+
tests/cases/conformance/jsx/19.tsx(1,9): error TS2695: Left side of comma operator is unused and has no side effects.
3739
tests/cases/conformance/jsx/19.tsx(1,64): error TS2657: JSX expressions must have one parent element.
3840
tests/cases/conformance/jsx/2.tsx(1,3): error TS1003: Identifier expected.
3941
tests/cases/conformance/jsx/20.tsx(1,10): error TS1005: '}' expected.
@@ -56,6 +58,7 @@ tests/cases/conformance/jsx/25.tsx(1,39): error TS1109: Expression expected.
5658
tests/cases/conformance/jsx/28.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag.
5759
tests/cases/conformance/jsx/28.tsx(1,6): error TS1005: '{' expected.
5860
tests/cases/conformance/jsx/28.tsx(2,1): error TS1005: '</' expected.
61+
tests/cases/conformance/jsx/29.tsx(1,1): error TS2695: Left side of comma operator is unused and has no side effects.
5962
tests/cases/conformance/jsx/29.tsx(1,6): error TS1005: '{' expected.
6063
tests/cases/conformance/jsx/29.tsx(1,7): error TS1003: Identifier expected.
6164
tests/cases/conformance/jsx/29.tsx(2,1): error TS1005: '</' expected.
@@ -221,12 +224,16 @@ tests/cases/conformance/jsx/9.tsx(1,16): error TS1109: Expression expected.
221224
!!! error TS17008: JSX element 'a' has no corresponding closing tag.
222225

223226
!!! error TS1005: '</' expected.
224-
==== tests/cases/conformance/jsx/18.tsx (1 errors) ====
227+
==== tests/cases/conformance/jsx/18.tsx (2 errors) ====
225228
var x = <div>one</div><div>two</div>;;
229+
~~~~~~~~~~~~~~
230+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
226231
~
227232
!!! error TS2657: JSX expressions must have one parent element.
228-
==== tests/cases/conformance/jsx/19.tsx (1 errors) ====
233+
==== tests/cases/conformance/jsx/19.tsx (2 errors) ====
229234
var x = <div>one</div> /* intervening comment */ <div>two</div>;;
235+
~~~~~~~~~~~~~~
236+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
230237
~
231238
!!! error TS2657: JSX expressions must have one parent element.
232239
==== tests/cases/conformance/jsx/20.tsx (1 errors) ====
@@ -294,8 +301,10 @@ tests/cases/conformance/jsx/9.tsx(1,16): error TS1109: Expression expected.
294301

295302

296303
!!! error TS1005: '</' expected.
297-
==== tests/cases/conformance/jsx/29.tsx (3 errors) ====
304+
==== tests/cases/conformance/jsx/29.tsx (4 errors) ====
298305
<a b=<}>;
306+
~~~~~
307+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
299308
~
300309
!!! error TS1005: '{' expected.
301310
~

tests/baselines/reference/logicalNotOperatorWithAnyOtherType.errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(45,27): error TS2365: Operator '+' cannot be applied to types 'null' and 'undefined'.
22
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(46,27): error TS2365: Operator '+' cannot be applied to types 'null' and 'null'.
33
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(47,27): error TS2365: Operator '+' cannot be applied to types 'undefined' and 'undefined'.
4+
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts(57,1): error TS2695: Left side of comma operator is unused and has no side effects.
45

56

6-
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts (3 errors) ====
7+
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithAnyOtherType.ts (4 errors) ====
78
// ! operator on any type
89

910
var ANY: any;
@@ -67,5 +68,7 @@ tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNot
6768
!ANY1;
6869
!ANY2[0];
6970
!ANY, ANY1;
71+
~~~~
72+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
7073
!objA.a;
7174
!M.n;
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts(36,1): error TS2695: Left side of comma operator is unused and has no side effects.
2+
3+
4+
==== tests/cases/conformance/expressions/unaryOperators/logicalNotOperator/logicalNotOperatorWithBooleanType.ts (1 errors) ====
5+
// ! operator on boolean type
6+
var BOOLEAN: boolean;
7+
8+
function foo(): boolean { return true; }
9+
10+
class A {
11+
public a: boolean;
12+
static foo() { return false; }
13+
}
14+
module M {
15+
export var n: boolean;
16+
}
17+
18+
var objA = new A();
19+
20+
// boolean type var
21+
var ResultIsBoolean1 = !BOOLEAN;
22+
23+
// boolean type literal
24+
var ResultIsBoolean2 = !true;
25+
var ResultIsBoolean3 = !{ x: true, y: false };
26+
27+
// boolean type expressions
28+
var ResultIsBoolean4 = !objA.a;
29+
var ResultIsBoolean5 = !M.n;
30+
var ResultIsBoolean6 = !foo();
31+
var ResultIsBoolean7 = !A.foo();
32+
33+
// multiple ! operators
34+
var ResultIsBoolean = !!BOOLEAN;
35+
36+
// miss assignment operators
37+
!true;
38+
!BOOLEAN;
39+
!foo();
40+
!true, false;
41+
~~~~~
42+
!!! error TS2695: Left side of comma operator is unused and has no side effects.
43+
!objA.a;
44+
!M.n;

0 commit comments

Comments
 (0)