File: propertyAccessOnTypeParameterWithoutConstraints.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 (104 lines) | stat: -rw-r--r-- 5,405 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
=== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithoutConstraints.ts ===
class C<T> {
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 0))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 8))

    f() {
>f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 12))

        var x: T;
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 2, 11))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 8))

        var a = x['toString'](); // should be string
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 3, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 2, 11))
>'toString' : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))

        return a + x.toString();
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 3, 11))
>x.toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 2, 11))
>toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
    }
}

var r = (new C<number>()).f();
>r : Symbol(r, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 8, 3))
>(new C<number>()).f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 12))
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 0))
>f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 0, 12))

interface I<T> {
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 8, 30))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 12))

    foo: T;
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 12))
}
var i: I<number>;
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 13, 3))
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 8, 30))

var r2 = i.foo.toString();
>r2 : Symbol(r2, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 14, 3))
>i.foo.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --))
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16))
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 13, 3))
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16))
>toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --))

var r2b = i.foo['toString']();
>r2b : Symbol(r2b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 15, 3))
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16))
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 13, 3))
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 10, 16))
>'toString' : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --))

var a: {
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3))

    <T>(): T;
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 18, 5))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 18, 5))
}
var r3: string = a().toString();
>r3 : Symbol(r3, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 20, 3))
>a().toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3))
>toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))

var r3b: string = a()['toString']();
>r3b : Symbol(r3b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 21, 3))
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 17, 3))
>'toString' : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))

var b = {
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 3))

    foo: <T>(x: T) => {
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 9))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 10))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 13))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 10))

        var a = x['toString'](); // should be string
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 25, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 13))
>'toString' : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))

        return a + x.toString();
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 25, 11))
>x.toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 24, 13))
>toString : Symbol(Object.toString, Decl(lib.es5.d.ts, --, --))
    }
}

var r4 = b.foo(1);
>r4 : Symbol(r4, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 30, 3))
>b.foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 9))
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 3))
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithoutConstraints.ts, 23, 9))