59 lines
2.8 KiB
Plaintext
59 lines
2.8 KiB
Plaintext
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(3,1): error TS2447: The '^=' operator is not allowed for boolean types. Consider using '!==' instead.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(9,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(14,1): error TS2447: The '&=' operator is not allowed for boolean types. Consider using '&&' instead.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(20,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(24,1): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
|
|
tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
|
|
|
|
==== tests/cases/compiler/bitwiseCompoundAssignmentOperators.ts (8 errors) ====
|
|
var a = true;
|
|
var b = 1;
|
|
a ^= a;
|
|
~~~~~~
|
|
!!! error TS2447: The '^=' operator is not allowed for boolean types. Consider using '!==' instead.
|
|
a = true;
|
|
b ^= b;
|
|
b = 1;
|
|
a ^= b;
|
|
~
|
|
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
a = true;
|
|
b ^= a;
|
|
~
|
|
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
b = 1;
|
|
|
|
var c = false;
|
|
var d = 2;
|
|
c &= c;
|
|
~~~~~~
|
|
!!! error TS2447: The '&=' operator is not allowed for boolean types. Consider using '&&' instead.
|
|
c = false;
|
|
d &= d;
|
|
d = 2;
|
|
c &= d;
|
|
~
|
|
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
c = false;
|
|
d &= c;
|
|
~
|
|
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
|
|
var e = true;
|
|
var f = 0;
|
|
e |= e;
|
|
~~~~~~
|
|
!!! error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead.
|
|
e = true;
|
|
f |= f;
|
|
f = 0;
|
|
e |= f;
|
|
~
|
|
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
|
e = true;
|
|
f |= f;
|
|
|
|
|