File: genericPrototypeProperty.symbols

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (35 lines) | stat: -rw-r--r-- 1,341 bytes parent folder | download | duplicates (7)
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
=== tests/cases/compiler/genericPrototypeProperty.ts ===
class C<T> {
>C : Symbol(C, Decl(genericPrototypeProperty.ts, 0, 0))
>T : Symbol(T, Decl(genericPrototypeProperty.ts, 0, 8))

    x: T;
>x : Symbol(C.x, Decl(genericPrototypeProperty.ts, 0, 12))
>T : Symbol(T, Decl(genericPrototypeProperty.ts, 0, 8))

    foo(x: T): T { return null; }
>foo : Symbol(C.foo, Decl(genericPrototypeProperty.ts, 1, 9))
>x : Symbol(x, Decl(genericPrototypeProperty.ts, 2, 8))
>T : Symbol(T, Decl(genericPrototypeProperty.ts, 0, 8))
>T : Symbol(T, Decl(genericPrototypeProperty.ts, 0, 8))
}

var r = C.prototype;
>r : Symbol(r, Decl(genericPrototypeProperty.ts, 5, 3))
>C.prototype : Symbol(C.prototype)
>C : Symbol(C, Decl(genericPrototypeProperty.ts, 0, 0))
>prototype : Symbol(C.prototype)

// should be any
var r2 = r.x
>r2 : Symbol(r2, Decl(genericPrototypeProperty.ts, 7, 3))
>r.x : Symbol(C.x, Decl(genericPrototypeProperty.ts, 0, 12))
>r : Symbol(r, Decl(genericPrototypeProperty.ts, 5, 3))
>x : Symbol(C.x, Decl(genericPrototypeProperty.ts, 0, 12))

var r3 = r.foo(null);
>r3 : Symbol(r3, Decl(genericPrototypeProperty.ts, 8, 3))
>r.foo : Symbol(C.foo, Decl(genericPrototypeProperty.ts, 1, 9))
>r : Symbol(r, Decl(genericPrototypeProperty.ts, 5, 3))
>foo : Symbol(C.foo, Decl(genericPrototypeProperty.ts, 1, 9))