mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
86 lines
3.8 KiB
Plaintext
86 lines
3.8 KiB
Plaintext
classStaticBlock26.ts(3,9): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(3,14): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(6,9): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(9,13): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(9,18): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(13,14): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(13,19): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(17,18): error TS1005: ':' expected.
|
|
classStaticBlock26.ts(20,9): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(20,14): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(21,15): error TS1003: Identifier expected.
|
|
classStaticBlock26.ts(21,15): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(21,20): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(25,21): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(25,26): error TS1109: Expression expected.
|
|
classStaticBlock26.ts(25,28): error TS1005: ';' expected.
|
|
classStaticBlock26.ts(26,21): error TS18037: 'await' expression cannot be used inside a class static block.
|
|
classStaticBlock26.ts(26,27): error TS1109: Expression expected.
|
|
|
|
|
|
==== classStaticBlock26.ts (18 errors) ====
|
|
class C {
|
|
static {
|
|
await; // illegal
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
}
|
|
static {
|
|
await (1); // illegal
|
|
~~~~~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
}
|
|
static {
|
|
({ [await]: 1 }); // illegal
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
}
|
|
static {
|
|
class D {
|
|
[await] = 1; // illegal (computed property names are evaluated outside of a class body
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
};
|
|
}
|
|
static {
|
|
({ await }); // illegal short-hand property reference
|
|
~
|
|
!!! error TS1005: ':' expected.
|
|
}
|
|
static {
|
|
await: // illegal, 'await' cannot be used as a label
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
break await; // illegal, 'await' cannot be used as a label
|
|
~~~~~
|
|
!!! error TS1003: Identifier expected.
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
}
|
|
static {
|
|
function f(await) { }
|
|
const ff = (await) => { }
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
~~
|
|
!!! error TS1005: ';' expected.
|
|
const fff = await => { }
|
|
~~~~~
|
|
!!! error TS18037: 'await' expression cannot be used inside a class static block.
|
|
~~
|
|
!!! error TS1109: Expression expected.
|
|
}
|
|
}
|
|
|