1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
// @lib: es5,es2015.promise
// @noEmitHelpers: true
// @target: ES5
// @lib: es2015
// mainly to verify indentation of emitted code
function g() { return "g"; }
function* objectLiteral1() {
const x = {
a: 1,
b: yield 2,
c: 3,
}
}
function* objectLiteral2() {
const x = {
a: 1,
[g()]: yield 2,
c: 3,
}
}
function* objectLiteral3() {
const x = {
a: 1,
b: yield 2,
[g()]: 3,
c: 4,
}
}
function* objectLiteral4() {
const x = {
a: 1,
[g()]: 2,
b: yield 3,
c: 4,
}
}
function* objectLiteral5() {
const x = {
a: 1,
[g()]: yield 2,
c: 4,
}
}
function* objectLiteral6() {
const x = {
a: 1,
[yield]: 2,
c: 4,
}
}
function* objectLiteral7() {
const x = {
a: 1,
[yield]: yield 2,
c: 4,
}
}
|