1
1
=== tests/cases/conformance/types/typeRelationships/recursiveTypes/nominalSubtypeCheckOfTypeParameter.ts ===
2
- interface Tuple <T, S> {
3
- >Tuple : Symbol(Tuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
4
- >T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 16 ))
5
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 18 ))
2
+ interface BinaryTuple <T, S> {
3
+ >BinaryTuple : Symbol(BinaryTuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
4
+ >T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 22 ))
5
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 24 ))
6
6
7
7
first: T
8
- >first : Symbol(Tuple .first, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 23 ))
9
- >T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 16 ))
8
+ >first : Symbol(BinaryTuple .first, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 29 ))
9
+ >T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 22 ))
10
10
11
- second: S
12
- >second : Symbol(Tuple .second, Decl(nominalSubtypeCheckOfTypeParameter.ts, 1, 12))
13
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 18 ))
11
+ second: S
12
+ >second : Symbol(BinaryTuple .second, Decl(nominalSubtypeCheckOfTypeParameter.ts, 1, 12))
13
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 24 ))
14
14
}
15
15
16
16
interface Sequence<T> {
@@ -20,20 +20,20 @@ interface Sequence<T> {
20
20
hasNext(): boolean
21
21
>hasNext : Symbol(Sequence.hasNext, Decl(nominalSubtypeCheckOfTypeParameter.ts, 5, 23))
22
22
23
- pop(): T
23
+ pop(): T
24
24
>pop : Symbol(Sequence.pop, Decl(nominalSubtypeCheckOfTypeParameter.ts, 6, 22))
25
25
>T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 5, 19))
26
26
27
- zip<S>(seq: Sequence<S>): Sequence<Tuple <T, S>>
28
- >zip : Symbol(Sequence.zip, Decl(nominalSubtypeCheckOfTypeParameter.ts, 7, 14 ))
29
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 10 ))
30
- >seq : Symbol(seq, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 13 ))
27
+ zip<S>(seq: Sequence<S>): Sequence<BinaryTuple <T, S>>
28
+ >zip : Symbol(Sequence.zip, Decl(nominalSubtypeCheckOfTypeParameter.ts, 7, 12 ))
29
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 8 ))
30
+ >seq : Symbol(seq, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 11 ))
31
31
>Sequence : Symbol(Sequence, Decl(nominalSubtypeCheckOfTypeParameter.ts, 3, 1))
32
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 10 ))
32
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 8 ))
33
33
>Sequence : Symbol(Sequence, Decl(nominalSubtypeCheckOfTypeParameter.ts, 3, 1))
34
- >Tuple : Symbol(Tuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
34
+ >BinaryTuple : Symbol(BinaryTuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
35
35
>T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 5, 19))
36
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 10 ))
36
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 8, 8 ))
37
37
}
38
38
39
39
// error, despite the fact that the code explicitly says List<T> extends Sequence<T>, the current rules for infinitely expanding type references
@@ -47,15 +47,15 @@ interface List<T> extends Sequence<T> {
47
47
getLength(): number
48
48
>getLength : Symbol(List.getLength, Decl(nominalSubtypeCheckOfTypeParameter.ts, 13, 39))
49
49
50
- zip<S>(seq: Sequence<S>): List<Tuple <T, S>>
50
+ zip<S>(seq: Sequence<S>): List<BinaryTuple <T, S>>
51
51
>zip : Symbol(List.zip, Decl(nominalSubtypeCheckOfTypeParameter.ts, 14, 23))
52
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 10 ))
53
- >seq : Symbol(seq, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 13 ))
52
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 8 ))
53
+ >seq : Symbol(seq, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 11 ))
54
54
>Sequence : Symbol(Sequence, Decl(nominalSubtypeCheckOfTypeParameter.ts, 3, 1))
55
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 10 ))
55
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 8 ))
56
56
>List : Symbol(List, Decl(nominalSubtypeCheckOfTypeParameter.ts, 9, 1))
57
- >Tuple : Symbol(Tuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
57
+ >BinaryTuple : Symbol(BinaryTuple , Decl(nominalSubtypeCheckOfTypeParameter.ts, 0, 0))
58
58
>T : Symbol(T, Decl(nominalSubtypeCheckOfTypeParameter.ts, 13, 15))
59
- >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 10 ))
59
+ >S : Symbol(S, Decl(nominalSubtypeCheckOfTypeParameter.ts, 15, 8 ))
60
60
}
61
61
0 commit comments