File: inheritanceOfGenericConstructorMethod2.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 (53 lines) | stat: -rw-r--r-- 2,702 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
=== tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts ===
module M {
>M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0))

   export class C1 { }
>C1 : Symbol(C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10))

   export class C2<T> { }
>C2 : Symbol(C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22))
>T : Symbol(T, Decl(inheritanceOfGenericConstructorMethod2.ts, 2, 19))
}
module N {
>N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1))

   export class D1 extends M.C1 { }
>D1 : Symbol(D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10))
>M.C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10))
>M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0))
>C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10))

   export class D2<T> extends M.C2<T> { }
>D2 : Symbol(D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35))
>T : Symbol(T, Decl(inheritanceOfGenericConstructorMethod2.ts, 6, 19))
>M.C2 : Symbol(M.C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22))
>M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0))
>C2 : Symbol(M.C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22))
>T : Symbol(T, Decl(inheritanceOfGenericConstructorMethod2.ts, 6, 19))
}

var c = new M.C2<number>(); // no error
>c : Symbol(c, Decl(inheritanceOfGenericConstructorMethod2.ts, 9, 3))
>M.C2 : Symbol(M.C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22))
>M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0))
>C2 : Symbol(M.C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22))

var n = new N.D1(); // no error
>n : Symbol(n, Decl(inheritanceOfGenericConstructorMethod2.ts, 10, 3))
>N.D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10))
>N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1))
>D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10))

var n2 = new N.D2<number>(); // error
>n2 : Symbol(n2, Decl(inheritanceOfGenericConstructorMethod2.ts, 11, 3))
>N.D2 : Symbol(N.D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35))
>N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1))
>D2 : Symbol(N.D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35))

var n3 = new N.D2(); // no error, D2<any>
>n3 : Symbol(n3, Decl(inheritanceOfGenericConstructorMethod2.ts, 12, 3))
>N.D2 : Symbol(N.D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35))
>N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1))
>D2 : Symbol(N.D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35))