TypeScript/tests/baselines/reference/assignmentCompatWithGenericCallSignatures2.types

45 lines
2 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithGenericCallSignatures2.ts ===
// some complex cases of assignment compat of generic signatures. No contextual signature instantiation
interface A {
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(assignmentCompatWithGenericCallSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
<T>(x: T, ...y: T[][]): void
2015-04-13 23:01:57 +02:00
>T : T, Symbol(T, Decl(assignmentCompatWithGenericCallSignatures2.ts, 3, 5))
>x : T, Symbol(x, Decl(assignmentCompatWithGenericCallSignatures2.ts, 3, 8))
>T : T, Symbol(T, Decl(assignmentCompatWithGenericCallSignatures2.ts, 3, 5))
>y : T[][], Symbol(y, Decl(assignmentCompatWithGenericCallSignatures2.ts, 3, 13))
>T : T, Symbol(T, Decl(assignmentCompatWithGenericCallSignatures2.ts, 3, 5))
2014-08-15 23:33:16 +02:00
}
interface B {
2015-04-13 23:01:57 +02:00
>B : B, Symbol(B, Decl(assignmentCompatWithGenericCallSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
<S>(x: S, ...y: S[]): void
2015-04-13 23:01:57 +02:00
>S : S, Symbol(S, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 5))
>x : S, Symbol(x, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 8))
>S : S, Symbol(S, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 5))
>y : S[], Symbol(y, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 13))
>S : S, Symbol(S, Decl(assignmentCompatWithGenericCallSignatures2.ts, 7, 5))
2014-08-15 23:33:16 +02:00
}
var a: A;
2015-04-13 23:01:57 +02:00
>a : A, Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3))
>A : A, Symbol(A, Decl(assignmentCompatWithGenericCallSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var b: B;
2015-04-13 23:01:57 +02:00
>b : B, Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3))
>B : B, Symbol(B, Decl(assignmentCompatWithGenericCallSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
// Both ok
a = b;
>a = b : B
2015-04-13 23:01:57 +02:00
>a : A, Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3))
>b : B, Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3))
2014-08-15 23:33:16 +02:00
b = a;
>b = a : A
2015-04-13 23:01:57 +02:00
>b : B, Symbol(b, Decl(assignmentCompatWithGenericCallSignatures2.ts, 11, 3))
>a : A, Symbol(a, Decl(assignmentCompatWithGenericCallSignatures2.ts, 10, 3))
2014-08-15 23:33:16 +02:00