File: assignmentCompatWithConstructSignatures.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 (102 lines) | stat: -rw-r--r-- 4,155 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts ===
// void returning call signatures can be assigned a non-void returning call signature that otherwise matches

interface T {
>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures.ts, 0, 0))

    new (x: number): void;
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 3, 9))
}
var t: T;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>T : Symbol(T, Decl(assignmentCompatWithConstructSignatures.ts, 0, 0))

var a: { new (x: number): void };
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 6, 14))

t = a;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))

a = t;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))

interface S {
>S : Symbol(S, Decl(assignmentCompatWithConstructSignatures.ts, 9, 6))

    new (x: number): string;
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 12, 9))
}
var s: S;
>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3))
>S : Symbol(S, Decl(assignmentCompatWithConstructSignatures.ts, 9, 6))

var a2: { new (x: number): string };
>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 15, 15))

t = s;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3))

t = a2;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3))

a = s;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>s : Symbol(s, Decl(assignmentCompatWithConstructSignatures.ts, 14, 3))

a = a2;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>a2 : Symbol(a2, Decl(assignmentCompatWithConstructSignatures.ts, 15, 3))

interface S2 {
>S2 : Symbol(S2, Decl(assignmentCompatWithConstructSignatures.ts, 19, 7))

    (x: string): void;
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 22, 5))
}
var s2: S2;
>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3))
>S2 : Symbol(S2, Decl(assignmentCompatWithConstructSignatures.ts, 19, 7))

var a3: { (x: string): void };
>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 25, 11))

// these are errors
t = s2;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3))

t = a3;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3))

t = (x: string) => 1;
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 29, 5))

t = function (x: string) { return ''; }
>t : Symbol(t, Decl(assignmentCompatWithConstructSignatures.ts, 5, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 30, 14))

a = s2;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>s2 : Symbol(s2, Decl(assignmentCompatWithConstructSignatures.ts, 24, 3))

a = a3;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>a3 : Symbol(a3, Decl(assignmentCompatWithConstructSignatures.ts, 25, 3))

a = (x: string) => 1;
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 33, 5))

a = function (x: string) { return ''; }
>a : Symbol(a, Decl(assignmentCompatWithConstructSignatures.ts, 6, 3))
>x : Symbol(x, Decl(assignmentCompatWithConstructSignatures.ts, 34, 14))