File: genericClassWithStaticsUsingTypeArguments.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (44 lines) | stat: -rw-r--r-- 1,777 bytes parent folder | download | duplicates (3)
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
=== tests/cases/compiler/genericClassWithStaticsUsingTypeArguments.ts ===
// Should be error to use 'T' in all declarations within Foo.
class Foo<T> {
>Foo : Symbol(Foo, Decl(genericClassWithStaticsUsingTypeArguments.ts, 0, 0))
>T : Symbol(T, Decl(genericClassWithStaticsUsingTypeArguments.ts, 1, 10))

    static a = (n: T) => { };
>a : Symbol(Foo.a, Decl(genericClassWithStaticsUsingTypeArguments.ts, 1, 14))
>n : Symbol(n, Decl(genericClassWithStaticsUsingTypeArguments.ts, 2, 16))
>T : Symbol(T)

    static b: T;
>b : Symbol(Foo.b, Decl(genericClassWithStaticsUsingTypeArguments.ts, 2, 29))
>T : Symbol(T)

    static c: T[] = [];
>c : Symbol(Foo.c, Decl(genericClassWithStaticsUsingTypeArguments.ts, 4, 16))
>T : Symbol(T)

    static d = false || ((x: T) => x || undefined)(null)
>d : Symbol(Foo.d, Decl(genericClassWithStaticsUsingTypeArguments.ts, 6, 23))
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 26))
>T : Symbol(T)
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 26))
>undefined : Symbol(undefined)

    static e = function (x: T) { return null; }
>e : Symbol(Foo.e, Decl(genericClassWithStaticsUsingTypeArguments.ts, 8, 56))
>x : Symbol(x, Decl(genericClassWithStaticsUsingTypeArguments.ts, 10, 25))
>T : Symbol(T)

    static f(xs: T[]): T[] {
>f : Symbol(Foo.f, Decl(genericClassWithStaticsUsingTypeArguments.ts, 10, 47))
>xs : Symbol(xs, Decl(genericClassWithStaticsUsingTypeArguments.ts, 12, 13))
>T : Symbol(T)
>T : Symbol(T)

        return xs.reverse();
>xs.reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --))
>xs : Symbol(xs, Decl(genericClassWithStaticsUsingTypeArguments.ts, 12, 13))
>reverse : Symbol(Array.reverse, Decl(lib.es5.d.ts, --, --))
    }
}