File: propertyAccessOnTypeParameterWithConstraints4.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 (102 lines) | stat: -rw-r--r-- 5,649 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
=== tests/cases/conformance/types/typeParameters/typeParameterLists/propertyAccessOnTypeParameterWithConstraints4.ts ===
class C<T extends Date> {
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 0))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 8))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

    f() {
>f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 25))

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

        var a = x['notHere'](); // should be string
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 3, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 2, 11))

        return a + x.notHere();
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 3, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 2, 11))
    }
}

var r = (new C<Date>()).f();
>r : Symbol(r, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 8, 3))
>(new C<Date>()).f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 25))
>C : Symbol(C, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 0))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
>f : Symbol(C.f, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 0, 25))

interface I<T extends Date> {
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 8, 28))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 12))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

    foo: T;
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 29))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 12))
}
var i: I<Date>;
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 13, 3))
>I : Symbol(I, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 8, 28))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

var r2 = i.foo.notHere();
>r2 : Symbol(r2, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 14, 3))
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 29))
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 13, 3))
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 29))

var r2b = i.foo['notHere']();
>r2b : Symbol(r2b, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 15, 3))
>i.foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 29))
>i : Symbol(i, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 13, 3))
>foo : Symbol(I.foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 10, 29))

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

    <T extends Date>(): T;
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 18, 5))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 18, 5))
}
var r3: string = a().notHere();
>r3 : Symbol(r3, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 20, 3))
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 17, 3))

var r3b: string = a()['notHere']();
>r3b : Symbol(r3b, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 21, 3))
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 17, 3))

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

    foo: <T extends Date>(x: T): T => {
>foo : Symbol(foo, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 23, 9))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 10))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 26))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 10))
>T : Symbol(T, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 10))

        var a = x['notHere'](); // should be string
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 25, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 26))

        return a + x.notHere();
>a : Symbol(a, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 25, 11))
>x : Symbol(x, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 24, 26))

    },
    bar: b.foo().notHere()
>bar : Symbol(bar, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 27, 6))
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 23, 3))
}

var r4 = b.foo(new Date());
>r4 : Symbol(r4, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 31, 3))
>b : Symbol(b, Decl(propertyAccessOnTypeParameterWithConstraints4.ts, 23, 3))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))