Open
Description
https://github.com/tc39/proposal-do-expressions
Do expressions expose a spec internal concept (completions) as something that the user can use. However, users have been somewhat confused about do expressions in certain cases. For example
let x =(do {
while (cond) {
// do something
}
});
What is the value of X? Some users would say an array. To limit confusion, this is an early error. But there are other interesting questions to be asked here which I forget because the student we had working on this abandoned it. We would need to refresh and talk to the champion to pick this back up.