268 lines
26 KiB
Text
268 lines
26 KiB
Text
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts ===
|
|
// Two call or construct signatures are considered identical when they have the same number of type parameters and, considering those
|
|
// parameters pairwise identical, have identical type parameter constraints, identical number of parameters with identical kind(required,
|
|
// optional or rest) and types, and identical return types.
|
|
|
|
class B<T> {
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 4, 8))
|
|
|
|
constructor(x: T) { return null; }
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 5, 16))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 4, 8))
|
|
}
|
|
|
|
class C<T> {
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 8, 8))
|
|
|
|
constructor(x: T) { return null; }
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 9, 16))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 8, 8))
|
|
}
|
|
|
|
interface I<T> {
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 12, 12))
|
|
|
|
new(x: T): Date;
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 13, 8))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 12, 12))
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
}
|
|
|
|
interface I2 {
|
|
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 14, 1))
|
|
|
|
new<T>(x: T): RegExp;
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 8))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 11))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 17, 8))
|
|
>RegExp : Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11))
|
|
}
|
|
|
|
var a: { new<T>(x: T): T }
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 13))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 16))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 13))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 13))
|
|
|
|
var b = { new<T>(x: T): T { return null; } }; // not a construct signature, function called new
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
>new : Symbol(new, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 9))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 14))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 17))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 14))
|
|
>T : Symbol(T, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 14))
|
|
|
|
function foo1b(x: B<string>);
|
|
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 45), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 23, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 24, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 23, 15))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo1b(x: B<string>); // error
|
|
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 45), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 23, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 24, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 24, 15))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo1b(x: any) { }
|
|
>foo1b : Symbol(foo1b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 45), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 23, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 24, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 25, 15))
|
|
|
|
function foo1c(x: C<string>);
|
|
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 28, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 27, 15))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo1c(x: C<string>); // error
|
|
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 28, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 28, 15))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo1c(x: any) { }
|
|
>foo1c : Symbol(foo1c, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 25, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 27, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 28, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 29, 15))
|
|
|
|
function foo2(x: I<string>);
|
|
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 32, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 31, 14))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo2(x: I<string>); // error
|
|
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 32, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 32, 14))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo2(x: any) { }
|
|
>foo2 : Symbol(foo2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 29, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 31, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 32, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 33, 14))
|
|
|
|
function foo3(x: typeof a);
|
|
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 33, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 35, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 36, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 35, 14))
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
|
|
function foo3(x: typeof a); // error
|
|
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 33, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 35, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 36, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 36, 14))
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
|
|
function foo3(x: any) { }
|
|
>foo3 : Symbol(foo3, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 33, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 35, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 36, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 37, 14))
|
|
|
|
function foo4(x: typeof b);
|
|
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 40, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 39, 14))
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
|
|
function foo4(x: typeof b); // error
|
|
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 40, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 40, 14))
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
|
|
function foo4(x: any) { }
|
|
>foo4 : Symbol(foo4, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 37, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 39, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 40, 27))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 41, 14))
|
|
|
|
function foo5(x: typeof a): number;
|
|
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 44, 35))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 43, 14))
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
|
|
function foo5(x: typeof b): string; // ok
|
|
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 44, 35))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 44, 14))
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
|
|
function foo5(x: any): any { }
|
|
>foo5 : Symbol(foo5, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 41, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 43, 35), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 44, 35))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 45, 14))
|
|
|
|
function foo8(x: B<string>);
|
|
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 45, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 47, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 48, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 47, 14))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo8(x: I<string>); // ok
|
|
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 45, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 47, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 48, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 48, 14))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo8(x: any) { }
|
|
>foo8 : Symbol(foo8, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 45, 30), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 47, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 48, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 49, 14))
|
|
|
|
function foo9(x: B<string>);
|
|
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 51, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 52, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 51, 14))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo9(x: C<string>); // error since types are structurally equal
|
|
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 51, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 52, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 52, 14))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo9(x: any) { }
|
|
>foo9 : Symbol(foo9, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 49, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 51, 28), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 52, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 53, 14))
|
|
|
|
function foo10(x: B<string>);
|
|
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 53, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 55, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 56, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 55, 15))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo10(x: typeof a); // ok
|
|
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 53, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 55, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 56, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 56, 15))
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
|
|
function foo10(x: any) { }
|
|
>foo10 : Symbol(foo10, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 53, 25), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 55, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 56, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 57, 15))
|
|
|
|
function foo11(x: B<string>);
|
|
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 60, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 59, 15))
|
|
>B : Symbol(B, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 0, 0))
|
|
|
|
function foo11(x: typeof b); // ok
|
|
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 60, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 60, 15))
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
|
|
function foo11(x: any) { }
|
|
>foo11 : Symbol(foo11, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 57, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 59, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 60, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 61, 15))
|
|
|
|
function foo12(x: I<string>);
|
|
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 63, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 64, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 63, 15))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo12(x: C<string>); // ok
|
|
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 63, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 64, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 64, 15))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo12(x: any) { }
|
|
>foo12 : Symbol(foo12, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 61, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 63, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 64, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 65, 15))
|
|
|
|
function foo12b(x: I2);
|
|
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 67, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 68, 30))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 67, 16))
|
|
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 14, 1))
|
|
|
|
function foo12b(x: C<string>); // ok
|
|
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 67, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 68, 30))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 68, 16))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo12b(x: any) { }
|
|
>foo12b : Symbol(foo12b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 65, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 67, 23), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 68, 30))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 69, 16))
|
|
|
|
function foo13(x: I<string>);
|
|
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 69, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 71, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 72, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 71, 15))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo13(x: typeof a); // ok
|
|
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 69, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 71, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 72, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 72, 15))
|
|
>a : Symbol(a, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 20, 3))
|
|
|
|
function foo13(x: any) { }
|
|
>foo13 : Symbol(foo13, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 69, 27), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 71, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 72, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 73, 15))
|
|
|
|
function foo14(x: I<string>);
|
|
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 75, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 76, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 75, 15))
|
|
>I : Symbol(I, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 10, 1))
|
|
|
|
function foo14(x: typeof b); // ok
|
|
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 75, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 76, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 76, 15))
|
|
>b : Symbol(b, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 21, 3))
|
|
|
|
function foo14(x: any) { }
|
|
>foo14 : Symbol(foo14, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 73, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 75, 29), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 76, 28))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 77, 15))
|
|
|
|
function foo15(x: I2);
|
|
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 77, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 79, 22), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 80, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 79, 15))
|
|
>I2 : Symbol(I2, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 14, 1))
|
|
|
|
function foo15(x: C<number>); // ok
|
|
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 77, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 79, 22), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 80, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 80, 15))
|
|
>C : Symbol(C, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 6, 1))
|
|
|
|
function foo15(x: any) { }
|
|
>foo15 : Symbol(foo15, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 77, 26), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 79, 22), Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 80, 29))
|
|
>x : Symbol(x, Decl(objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.ts, 81, 15))
|
|
|