|
1 | 1 | tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
2 |
| -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. |
| 2 | +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. |
3 | 3 | tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location.
|
4 | 4 | tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
|
5 |
| -tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. |
| 5 | +tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. |
6 | 6 | tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location.
|
7 | 7 |
|
8 | 8 |
|
@@ -40,7 +40,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
|
40 | 40 | enum E {
|
41 | 41 | x = () => 4, // Error expected
|
42 | 42 | ~~~~~~~
|
43 |
| -!!! error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. |
| 43 | +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. |
44 | 44 | y = (() => this).length // error, can't use this in enum
|
45 | 45 | ~~~~
|
46 | 46 | !!! error TS2332: 'this' cannot be referenced in current location.
|
@@ -87,7 +87,7 @@ tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts(72,20): e
|
87 | 87 | enum E {
|
88 | 88 | x = () => 4, // Error expected
|
89 | 89 | ~~~~~~~
|
90 |
| -!!! error TS18033: Only numeric enums can have computed members, but this expression has type '() => number'. If you do not need exhaustiveness checks, consider using an object literal instead. |
| 90 | +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. |
91 | 91 | y = (() => this).length
|
92 | 92 | ~~~~
|
93 | 93 | !!! error TS2332: 'this' cannot be referenced in current location.
|
|
0 commit comments