File: objectTypesIdentityWithComplexConstraints.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 (49 lines) | stat: -rw-r--r-- 2,925 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
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithComplexConstraints.ts ===
interface A {
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))

      <T extends {
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))

            <S extends A>(x: T, y: S): void
>S : Symbol(S, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 13))
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 26))
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 31))
>S : Symbol(S, Decl(objectTypesIdentityWithComplexConstraints.ts, 2, 13))

      }>(x: T, y: T): void
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 3, 9))
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 3, 14))
>T : Symbol(T, Decl(objectTypesIdentityWithComplexConstraints.ts, 1, 7))
}

interface B {
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))

      <U extends B>(x: U, y: U): void
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 20))
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
>y : Symbol(y, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 25))
>U : Symbol(U, Decl(objectTypesIdentityWithComplexConstraints.ts, 7, 7))
}

// ok, not considered identical because the steps of contextual signature instantiation create fresh type parameters
function foo(x: A);
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 13))
>A : Symbol(A, Decl(objectTypesIdentityWithComplexConstraints.ts, 0, 0))

function foo(x: B); // error after constraints above made illegal
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 13))
>B : Symbol(B, Decl(objectTypesIdentityWithComplexConstraints.ts, 4, 1))

function foo(x: any) { }
>foo : Symbol(foo, Decl(objectTypesIdentityWithComplexConstraints.ts, 8, 1), Decl(objectTypesIdentityWithComplexConstraints.ts, 11, 19), Decl(objectTypesIdentityWithComplexConstraints.ts, 12, 19))
>x : Symbol(x, Decl(objectTypesIdentityWithComplexConstraints.ts, 13, 13))