TypeScript/tests/cases/conformance/async/es2017/await_unaryExpression_es2017_3.ts
2016-10-12 21:58:25 +02:00

19 lines
333 B
TypeScript

// @target: es2017
async function bar1() {
++await 42; // Error
}
async function bar2() {
--await 42; // Error
}
async function bar3() {
var x = 42;
await x++; // OK but shouldn't need parenthesis
}
async function bar4() {
var x = 42;
await x--; // OK but shouldn't need parenthesis
}