File: computedPropertyNames50_ES6.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (40 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (5)
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
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames50_ES6.ts ===
var x = {
>x : Symbol(x, Decl(computedPropertyNames50_ES6.ts, 0, 3))

    p1: 10,
>p1 : Symbol(p1, Decl(computedPropertyNames50_ES6.ts, 0, 9))

    get foo() {
>foo : Symbol(foo, Decl(computedPropertyNames50_ES6.ts, 1, 11))

        if (1 == 1) {
            return 10;
        }
    },
    get [1 + 1]() {
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames50_ES6.ts, 6, 6))

        throw 10;
    },
    set [1 + 1]() {
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames50_ES6.ts, 9, 6))

        // just throw
        throw 10;
    },
    get [1 + 1]() {
>[1 + 1] : Symbol([1 + 1], Decl(computedPropertyNames50_ES6.ts, 13, 6))

        return 10;
    },
    get foo() {
>foo : Symbol(foo, Decl(computedPropertyNames50_ES6.ts, 16, 6))

        if (2 == 2) {
            return 20;
        }
    },
    p2: 20
>p2 : Symbol(p2, Decl(computedPropertyNames50_ES6.ts, 21, 6))
}