1+ tests/cases/compiler/nanEquality.ts(1,15): error TS2451: Cannot redeclare block-scoped variable 'x'.
12tests/cases/compiler/nanEquality.ts(3,5): error TS2845: This condition will always return 'false'.
23tests/cases/compiler/nanEquality.ts(4,5): error TS2845: This condition will always return 'false'.
34tests/cases/compiler/nanEquality.ts(6,5): error TS2845: This condition will always return 'false'.
@@ -14,10 +15,14 @@ tests/cases/compiler/nanEquality.ts(21,5): error TS2845: This condition will alw
1415tests/cases/compiler/nanEquality.ts(22,5): error TS2845: This condition will always return 'true'.
1516tests/cases/compiler/nanEquality.ts(24,5): error TS2845: This condition will always return 'false'.
1617tests/cases/compiler/nanEquality.ts(25,5): error TS2845: This condition will always return 'true'.
18+ tests/cases/compiler/nanEquality.ts(28,13): error TS2451: Cannot redeclare block-scoped variable 'x'.
19+ tests/cases/compiler/nanEquality.ts(29,5): error TS2845: This condition will always return 'false'.
1720
1821
19- ==== tests/cases/compiler/nanEquality.ts (16 errors) ====
22+ ==== tests/cases/compiler/nanEquality.ts (19 errors) ====
2023 declare const x: number;
24+ ~
25+ !!! error TS2451: Cannot redeclare block-scoped variable 'x'.
2126
2227 if (x === NaN) {}
2328 ~~~~~~~~~
@@ -86,4 +91,13 @@ tests/cases/compiler/nanEquality.ts(25,5): error TS2845: This condition will alw
8691 if (NaN != NaN) {}
8792 ~~~~~~~~~~
8893!!! error TS2845: This condition will always return 'true'.
94+
95+ // ...
96+ declare let x: any;
97+ ~
98+ !!! error TS2451: Cannot redeclare block-scoped variable 'x'.
99+ if (NaN === x[0][1]) {}
100+ ~~~~~~~~~~~~~~~
101+ !!! error TS2845: This condition will always return 'false'.
102+ !!! related TS1369 tests/cases/compiler/nanEquality.ts:29:13: Did you mean 'Number.isNaN(...)'?
89103
0 commit comments