File: constructorImplementationWithDefaultValues2.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 (58 lines) | stat: -rw-r--r-- 2,813 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
=== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts ===
class C {
>C : Symbol(C, Decl(constructorImplementationWithDefaultValues2.ts, 0, 0))

    constructor(x);
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 1, 16))

    constructor(public x: string = 1) { // error
>x : Symbol(C.x, Decl(constructorImplementationWithDefaultValues2.ts, 2, 16))

        var y = x;
>y : Symbol(y, Decl(constructorImplementationWithDefaultValues2.ts, 3, 11))
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 2, 16))
    }
}

class D<T, U> {
>D : Symbol(D, Decl(constructorImplementationWithDefaultValues2.ts, 5, 1))
>T : Symbol(T, Decl(constructorImplementationWithDefaultValues2.ts, 7, 8))
>U : Symbol(U, Decl(constructorImplementationWithDefaultValues2.ts, 7, 10))

    constructor(x: T, y: U);
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 8, 16))
>T : Symbol(T, Decl(constructorImplementationWithDefaultValues2.ts, 7, 8))
>y : Symbol(y, Decl(constructorImplementationWithDefaultValues2.ts, 8, 21))
>U : Symbol(U, Decl(constructorImplementationWithDefaultValues2.ts, 7, 10))

    constructor(x: T = 1, public y: U = x) { // error
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 9, 16))
>T : Symbol(T, Decl(constructorImplementationWithDefaultValues2.ts, 7, 8))
>y : Symbol(D.y, Decl(constructorImplementationWithDefaultValues2.ts, 9, 25))
>U : Symbol(U, Decl(constructorImplementationWithDefaultValues2.ts, 7, 10))
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 9, 16))

        var z = x;
>z : Symbol(z, Decl(constructorImplementationWithDefaultValues2.ts, 10, 11))
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 9, 16))
    }
}

class E<T extends Date> {
>E : Symbol(E, Decl(constructorImplementationWithDefaultValues2.ts, 12, 1))
>T : Symbol(T, Decl(constructorImplementationWithDefaultValues2.ts, 14, 8))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

    constructor(x);
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 15, 16))

    constructor(x: T = new Date()) { // error
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 16, 16))
>T : Symbol(T, Decl(constructorImplementationWithDefaultValues2.ts, 14, 8))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

        var y = x;
>y : Symbol(y, Decl(constructorImplementationWithDefaultValues2.ts, 17, 11))
>x : Symbol(x, Decl(constructorImplementationWithDefaultValues2.ts, 16, 16))
    }
}