TypeScript/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types

248 lines
20 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures2.ts ===
// object types are identical structurally
class B {
2015-04-13 23:01:57 +02:00
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
constructor(x: number) { return null; }
2015-04-13 23:01:57 +02:00
>x : number, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 3, 16))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
}
class C<T> {
2015-04-13 23:01:57 +02:00
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures2.ts, 6, 8))
2014-08-15 23:33:16 +02:00
constructor(x: T) { return null; }
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 7, 16))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures2.ts, 6, 8))
2015-04-13 21:36:11 +02:00
>null : null
2014-08-15 23:33:16 +02:00
}
interface I {
2015-04-13 23:01:57 +02:00
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
new(x: boolean): string;
2015-04-13 23:01:57 +02:00
>x : boolean, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 11, 8))
2014-08-15 23:33:16 +02:00
}
interface I2<T> {
2015-04-13 23:01:57 +02:00
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 12, 1))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures2.ts, 14, 13))
2014-08-15 23:33:16 +02:00
new(x: T): T;
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 15, 8))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures2.ts, 14, 13))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures2.ts, 14, 13))
2014-08-15 23:33:16 +02:00
}
var a: { new(x: Date): string }
2015-04-13 23:01:57 +02:00
>a : new (x: Date) => string, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3))
>x : Date, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 13))
>Date : Date, Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
2014-08-15 23:33:16 +02:00
var b = { new(x: RegExp) { return ''; } }; // not a construct signature, function called new
2015-04-13 23:01:57 +02:00
>b : { new(x: RegExp): string; }, Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3))
>{ new(x: RegExp) { return ''; } } : { new(x: RegExp): string; }
2015-04-13 23:01:57 +02:00
>new : (x: RegExp) => string, Symbol(new, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 9))
>x : RegExp, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 14))
>RegExp : RegExp, Symbol(RegExp, Decl(lib.d.ts, 825, 1), Decl(lib.d.ts, 876, 11))
2015-04-13 21:36:11 +02:00
>'' : string
2014-08-15 23:33:16 +02:00
function foo1b(x: B);
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 42), Decl(objectTypesIdentityWithConstructSignatures2.ts, 21, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 22, 21))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 21, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo1b(x: B); // error
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 42), Decl(objectTypesIdentityWithConstructSignatures2.ts, 21, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 22, 21))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 22, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo1b(x: any) { }
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 42), Decl(objectTypesIdentityWithConstructSignatures2.ts, 21, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 22, 21))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 23, 15))
2014-08-15 23:33:16 +02:00
function foo1c(x: C<string>);
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures2.ts, 23, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 25, 29), Decl(objectTypesIdentityWithConstructSignatures2.ts, 26, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 25, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo1c(x: C<string>); // error
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures2.ts, 23, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 25, 29), Decl(objectTypesIdentityWithConstructSignatures2.ts, 26, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 26, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo1c(x: any) { }
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures2.ts, 23, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 25, 29), Decl(objectTypesIdentityWithConstructSignatures2.ts, 26, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 27, 15))
2014-08-15 23:33:16 +02:00
function foo2(x: I);
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 27, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 29, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 30, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 29, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo2(x: I); // error
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 27, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 29, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 30, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 30, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo2(x: any) { }
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 27, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 29, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 30, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 31, 14))
2014-08-15 23:33:16 +02:00
function foo3(x: typeof a);
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures2.ts, 31, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 33, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 34, 27))
>x : new (x: Date) => string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 33, 14))
>a : new (x: Date) => string, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3))
2014-08-15 23:33:16 +02:00
function foo3(x: typeof a); // error
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures2.ts, 31, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 33, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 34, 27))
>x : new (x: Date) => string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 34, 14))
>a : new (x: Date) => string, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3))
2014-08-15 23:33:16 +02:00
function foo3(x: any) { }
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: Date) => string): any; (x: new (x: Date) => string): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures2.ts, 31, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 33, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 34, 27))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 35, 14))
2014-08-15 23:33:16 +02:00
function foo4(x: typeof b);
2015-04-13 23:01:57 +02:00
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithConstructSignatures2.ts, 35, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 37, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 38, 27))
>x : { new(x: RegExp): string; }, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 37, 14))
>b : { new(x: RegExp): string; }, Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3))
2014-08-15 23:33:16 +02:00
function foo4(x: typeof b); // error
2015-04-13 23:01:57 +02:00
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithConstructSignatures2.ts, 35, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 37, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 38, 27))
>x : { new(x: RegExp): string; }, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 38, 14))
>b : { new(x: RegExp): string; }, Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3))
2014-08-15 23:33:16 +02:00
function foo4(x: any) { }
2015-04-13 23:01:57 +02:00
>foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo4, Decl(objectTypesIdentityWithConstructSignatures2.ts, 35, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 37, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 38, 27))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 39, 14))
2014-08-15 23:33:16 +02:00
function foo8(x: B);
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures2.ts, 39, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 41, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 42, 20))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 41, 14))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo8(x: I); // ok
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures2.ts, 39, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 41, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 42, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 42, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo8(x: any) { }
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures2.ts, 39, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 41, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 42, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 43, 14))
2014-08-15 23:33:16 +02:00
function foo9(x: B);
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures2.ts, 43, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 45, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 46, 28))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 45, 14))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo9(x: C<string>); // error, types are structurally equal
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures2.ts, 43, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 45, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 46, 28))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 46, 14))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo9(x: any) { }
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures2.ts, 43, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 45, 20), Decl(objectTypesIdentityWithConstructSignatures2.ts, 46, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 47, 14))
2014-08-15 23:33:16 +02:00
function foo10(x: B);
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: Date) => string): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures2.ts, 47, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 49, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 50, 28))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 49, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo10(x: typeof a); // ok
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: Date) => string): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures2.ts, 47, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 49, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 50, 28))
>x : new (x: Date) => string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 50, 15))
>a : new (x: Date) => string, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3))
2014-08-15 23:33:16 +02:00
function foo10(x: any) { }
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: Date) => string): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures2.ts, 47, 25), Decl(objectTypesIdentityWithConstructSignatures2.ts, 49, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 50, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 51, 15))
2014-08-15 23:33:16 +02:00
function foo11(x: B);
2015-04-13 23:01:57 +02:00
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithConstructSignatures2.ts, 51, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 53, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 54, 28))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 53, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo11(x: typeof b); // ok
2015-04-13 23:01:57 +02:00
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithConstructSignatures2.ts, 51, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 53, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 54, 28))
>x : { new(x: RegExp): string; }, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 54, 15))
>b : { new(x: RegExp): string; }, Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3))
2014-08-15 23:33:16 +02:00
function foo11(x: any) { }
2015-04-13 23:01:57 +02:00
>foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo11, Decl(objectTypesIdentityWithConstructSignatures2.ts, 51, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 53, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 54, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 55, 15))
2014-08-15 23:33:16 +02:00
function foo12(x: I);
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures2.ts, 55, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 57, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 58, 29))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 57, 15))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo12(x: C<string>); // ok
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures2.ts, 55, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 57, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 58, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 58, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo12(x: any) { }
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures2.ts, 55, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 57, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 58, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 59, 15))
2014-08-15 23:33:16 +02:00
function foo12b(x: I2<string>);
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 59, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 61, 31), Decl(objectTypesIdentityWithConstructSignatures2.ts, 62, 30))
>x : I2<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 61, 16))
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo12b(x: C<string>); // ok
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 59, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 61, 31), Decl(objectTypesIdentityWithConstructSignatures2.ts, 62, 30))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 62, 16))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo12b(x: any) { }
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 59, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 61, 31), Decl(objectTypesIdentityWithConstructSignatures2.ts, 62, 30))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 63, 16))
2014-08-15 23:33:16 +02:00
function foo13(x: I);
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: Date) => string): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures2.ts, 63, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 65, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 66, 28))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 65, 15))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo13(x: typeof a); // ok
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: Date) => string): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures2.ts, 63, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 65, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 66, 28))
>x : new (x: Date) => string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 66, 15))
>a : new (x: Date) => string, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures2.ts, 18, 3))
2014-08-15 23:33:16 +02:00
function foo13(x: any) { }
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: Date) => string): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures2.ts, 63, 27), Decl(objectTypesIdentityWithConstructSignatures2.ts, 65, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 66, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 67, 15))
2014-08-15 23:33:16 +02:00
function foo14(x: I);
2015-04-13 23:01:57 +02:00
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithConstructSignatures2.ts, 67, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 69, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 70, 28))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 69, 15))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures2.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo14(x: typeof b); // ok
2015-04-13 23:01:57 +02:00
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithConstructSignatures2.ts, 67, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 69, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 70, 28))
>x : { new(x: RegExp): string; }, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 70, 15))
>b : { new(x: RegExp): string; }, Symbol(b, Decl(objectTypesIdentityWithConstructSignatures2.ts, 19, 3))
2014-08-15 23:33:16 +02:00
function foo14(x: any) { }
2015-04-13 23:01:57 +02:00
>foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; }, Symbol(foo14, Decl(objectTypesIdentityWithConstructSignatures2.ts, 67, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 69, 21), Decl(objectTypesIdentityWithConstructSignatures2.ts, 70, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 71, 15))
2014-08-15 23:33:16 +02:00
function foo15(x: I2<string>);
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures2.ts, 71, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 73, 30), Decl(objectTypesIdentityWithConstructSignatures2.ts, 74, 29))
>x : I2<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 73, 15))
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures2.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo15(x: C<number>); // ok
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures2.ts, 71, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 73, 30), Decl(objectTypesIdentityWithConstructSignatures2.ts, 74, 29))
>x : C<number>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 74, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures2.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo15(x: any) { }
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures2.ts, 71, 26), Decl(objectTypesIdentityWithConstructSignatures2.ts, 73, 30), Decl(objectTypesIdentityWithConstructSignatures2.ts, 74, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures2.ts, 75, 15))
2014-08-15 23:33:16 +02:00