5321dcb09f
* disallow 'await' and 'yield' in property and enum member initializer * accept baseline changes * Add a test for #34887 Ensures that this fixes #34887
19 lines
No EOL
399 B
TypeScript
19 lines
No EOL
399 B
TypeScript
// @target: es2019
|
|
// @noTypesAndSymbols: true
|
|
async function* test(x: Promise<string>) {
|
|
class C {
|
|
[await x] = await x;
|
|
static [await x] = await x;
|
|
|
|
[yield 1] = yield 2;
|
|
static [yield 3] = yield 4;
|
|
}
|
|
|
|
return class {
|
|
[await x] = await x;
|
|
static [await x] = await x;
|
|
|
|
[yield 1] = yield 2;
|
|
static [yield 3] = yield 4;
|
|
}
|
|
} |