mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
43 lines
1.0 KiB
Plaintext
43 lines
1.0 KiB
Plaintext
//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames49_ES5.ts] ////
|
|
|
|
=== computedPropertyNames49_ES5.ts ===
|
|
var x = {
|
|
>x : Symbol(x, Decl(computedPropertyNames49_ES5.ts, 0, 3))
|
|
|
|
p1: 10,
|
|
>p1 : Symbol(p1, Decl(computedPropertyNames49_ES5.ts, 0, 9))
|
|
|
|
get [1 + 1]() {
|
|
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames49_ES5.ts, 1, 11))
|
|
|
|
throw 10;
|
|
},
|
|
get [1 + 1]() {
|
|
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames49_ES5.ts, 4, 6))
|
|
|
|
return 10;
|
|
},
|
|
set [1 + 1]() {
|
|
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames49_ES5.ts, 7, 6))
|
|
|
|
// just throw
|
|
throw 10;
|
|
},
|
|
get foo() {
|
|
>foo : Symbol(foo, Decl(computedPropertyNames49_ES5.ts, 11, 6))
|
|
|
|
if (1 == 1) {
|
|
return 10;
|
|
}
|
|
},
|
|
get foo() {
|
|
>foo : Symbol(foo, Decl(computedPropertyNames49_ES5.ts, 16, 6))
|
|
|
|
if (2 == 2) {
|
|
return 20;
|
|
}
|
|
},
|
|
p2: 20
|
|
>p2 : Symbol(p2, Decl(computedPropertyNames49_ES5.ts, 21, 6))
|
|
}
|