File: classWithoutExplicitConstructor.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (40 lines) | stat: -rw-r--r-- 1,527 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
=== tests/cases/conformance/classes/constructorDeclarations/automaticConstructors/classWithoutExplicitConstructor.ts ===
class C {
>C : Symbol(C, Decl(classWithoutExplicitConstructor.ts, 0, 0))

    x = 1
>x : Symbol(C.x, Decl(classWithoutExplicitConstructor.ts, 0, 9))

    y = 'hello';
>y : Symbol(C.y, Decl(classWithoutExplicitConstructor.ts, 1, 9))
}

var c = new C();
>c : Symbol(c, Decl(classWithoutExplicitConstructor.ts, 5, 3))
>C : Symbol(C, Decl(classWithoutExplicitConstructor.ts, 0, 0))

var c2 = new C(null); // error
>c2 : Symbol(c2, Decl(classWithoutExplicitConstructor.ts, 6, 3))
>C : Symbol(C, Decl(classWithoutExplicitConstructor.ts, 0, 0))

class D<T extends Date> {
>D : Symbol(D, Decl(classWithoutExplicitConstructor.ts, 6, 21))
>T : Symbol(T, Decl(classWithoutExplicitConstructor.ts, 8, 8))
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))

    x = 2
>x : Symbol(D.x, Decl(classWithoutExplicitConstructor.ts, 8, 25))

    y: T = null;
>y : Symbol(D.y, Decl(classWithoutExplicitConstructor.ts, 9, 9))
>T : Symbol(T, Decl(classWithoutExplicitConstructor.ts, 8, 8))
}

var d = new D();
>d : Symbol(d, Decl(classWithoutExplicitConstructor.ts, 13, 3))
>D : Symbol(D, Decl(classWithoutExplicitConstructor.ts, 6, 21))

var d2 = new D(null); // error
>d2 : Symbol(d2, Decl(classWithoutExplicitConstructor.ts, 14, 3))
>D : Symbol(D, Decl(classWithoutExplicitConstructor.ts, 6, 21))