1// @target: es2018 2// @lib: esnext 3// @noEmit: true 4// @filename: methodIsOk.ts 5class C1 { 6 async * f() { 7 } 8} 9// @filename: awaitMethodNameIsOk.ts 10class C2 { 11 async * await() { 12 } 13} 14// @filename: yieldMethodNameIsOk.ts 15class C3 { 16 async * yield() { 17 } 18} 19// @filename: awaitParameterIsError.ts 20class C4 { 21 async * f(await) { 22 } 23} 24// @filename: yieldParameterIsError.ts 25class C5 { 26 async * f(yield) { 27 } 28} 29// @filename: awaitInParameterInitializerIsError.ts 30class C6 { 31 async * f(a = await 1) { 32 } 33} 34// @filename: yieldInParameterInitializerIsError.ts 35class C7 { 36 async * f(a = yield) { 37 } 38} 39// @filename: nestedAsyncGeneratorIsOk.ts 40class C8 { 41 async * f() { 42 async function * g() { 43 } 44 } 45} 46// @filename: nestedFunctionDeclarationNamedYieldIsError.ts 47class C9 { 48 async * f() { 49 function yield() { 50 } 51 } 52} 53// @filename: nestedFunctionExpressionNamedYieldIsError.ts 54class C10 { 55 async * f() { 56 const x = function yield() { 57 }; 58 } 59} 60// @filename: nestedFunctionDeclarationNamedAwaitIsError.ts 61class C11 { 62 async * f() { 63 function await() { 64 } 65 } 66} 67// @filename: nestedFunctionExpressionNamedAwaitIsError.ts 68class C12 { 69 async * f() { 70 const x = function await() { 71 }; 72 } 73} 74// @filename: yieldIsOk.ts 75class C13 { 76 async * f() { 77 yield; 78 } 79} 80// @filename: yieldWithValueIsOk.ts 81class C14 { 82 async * f() { 83 yield 1; 84 } 85} 86// @filename: yieldStarMissingValueIsError.ts 87class C15 { 88 async * f() { 89 yield *; 90 } 91} 92// @filename: yieldStarWithValueIsOk.ts 93class C16 { 94 async * f() { 95 yield * []; 96 } 97} 98// @filename: awaitWithValueIsOk.ts 99class C17 { 100 async * f() { 101 await 1; 102 } 103} 104// @filename: awaitMissingValueIsError.ts 105class C18 { 106 async * f() { 107 await; 108 } 109} 110// @filename: awaitAsTypeIsOk.ts 111interface await {} 112class C19 { 113 async * f() { 114 let x: await; 115 } 116} 117// @filename: yieldAsTypeIsStrictError.ts 118interface yield {} 119class C20 { 120 async * f() { 121 let x: yield; 122 } 123} 124// @filename: yieldInClassComputedPropertyIsError.ts 125class C21 { 126 async * [yield]() { 127 } 128} 129// @filename: yieldInNestedComputedPropertyIsOk.ts 130class C22 { 131 async * f() { 132 const x = { [yield]: 1 }; 133 } 134} 135// @filename: asyncGeneratorGetAccessorIsError.ts 136class C23 { 137 async * get x() { 138 return 1; 139 } 140} 141// @filename: asyncGeneratorSetAccessorIsError.ts 142class C24 { 143 async * set x(value: number) { 144 } 145} 146// @filename: asyncGeneratorPropertyIsError.ts 147class C25 { 148 async * x = 1; 149} 150