mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
689 B
TypeScript
34 lines
689 B
TypeScript
//// [tests/cases/compiler/crashInYieldStarInAsyncFunction.ts] ////
|
|
|
|
//// [crashInYieldStarInAsyncFunction.ts]
|
|
// https://github.com/microsoft/TypeScript/issues/53145
|
|
var obj = {
|
|
[Symbol.asyncIterator]() {
|
|
return {
|
|
next() {
|
|
return { then() { } };
|
|
}
|
|
};
|
|
}
|
|
};
|
|
|
|
async function* g() {
|
|
yield* obj;
|
|
}
|
|
|
|
//// [crashInYieldStarInAsyncFunction.js]
|
|
"use strict";
|
|
// https://github.com/microsoft/TypeScript/issues/53145
|
|
var obj = {
|
|
[Symbol.asyncIterator]() {
|
|
return {
|
|
next() {
|
|
return { then() { } };
|
|
}
|
|
};
|
|
}
|
|
};
|
|
async function* g() {
|
|
yield* obj;
|
|
}
|