323 lines
30 KiB
Text
323 lines
30 KiB
Text
=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/anyAssignabilityInInheritance.ts ===
|
|
// any is not a subtype of any other types, errors expected on all the below derived classes unless otherwise noted
|
|
|
|
interface I {
|
|
>I : I, Symbol(I,Decl(anyAssignabilityInInheritance.ts,0,0))
|
|
|
|
[x: string]: any;
|
|
>x : string, Symbol(x,Decl(anyAssignabilityInInheritance.ts,3,5))
|
|
|
|
foo: any; // ok, any identical to itself
|
|
>foo : any, Symbol(foo,Decl(anyAssignabilityInInheritance.ts,3,21))
|
|
}
|
|
|
|
var a: any;
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo2(x: number): number;
|
|
>foo2 : { (x: number): number; (x: any): any; }, Symbol(foo2,Decl(anyAssignabilityInInheritance.ts,7,11),Decl(anyAssignabilityInInheritance.ts,9,41))
|
|
>x : number, Symbol(x,Decl(anyAssignabilityInInheritance.ts,9,22))
|
|
|
|
declare function foo2(x: any): any;
|
|
>foo2 : { (x: number): number; (x: any): any; }, Symbol(foo2,Decl(anyAssignabilityInInheritance.ts,7,11),Decl(anyAssignabilityInInheritance.ts,9,41))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,10,22))
|
|
|
|
var r3 = foo2(a); // any, not a subtype of number so it skips that overload, is a subtype of itself so it picks second (if truly ambiguous it would pick first overload)
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo2(a) : any
|
|
>foo2 : { (x: number): number; (x: any): any; }, Symbol(foo2,Decl(anyAssignabilityInInheritance.ts,7,11),Decl(anyAssignabilityInInheritance.ts,9,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo3(x: string): string;
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>x : string, Symbol(x,Decl(anyAssignabilityInInheritance.ts,13,22))
|
|
|
|
declare function foo3(x: any): any;
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,14,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo4(x: boolean): boolean;
|
|
>foo4 : { (x: boolean): boolean; (x: any): any; }, Symbol(foo4,Decl(anyAssignabilityInInheritance.ts,15,17),Decl(anyAssignabilityInInheritance.ts,17,43))
|
|
>x : boolean, Symbol(x,Decl(anyAssignabilityInInheritance.ts,17,22))
|
|
|
|
declare function foo4(x: any): any;
|
|
>foo4 : { (x: boolean): boolean; (x: any): any; }, Symbol(foo4,Decl(anyAssignabilityInInheritance.ts,15,17),Decl(anyAssignabilityInInheritance.ts,17,43))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,18,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo5(x: Date): Date;
|
|
>foo5 : { (x: Date): Date; (x: any): any; }, Symbol(foo5,Decl(anyAssignabilityInInheritance.ts,19,17),Decl(anyAssignabilityInInheritance.ts,21,37))
|
|
>x : Date, Symbol(x,Decl(anyAssignabilityInInheritance.ts,21,22))
|
|
>Date : Date, Symbol(Date,Decl(lib.d.ts,633,23),Decl(lib.d.ts,815,11))
|
|
>Date : Date, Symbol(Date,Decl(lib.d.ts,633,23),Decl(lib.d.ts,815,11))
|
|
|
|
declare function foo5(x: any): any;
|
|
>foo5 : { (x: Date): Date; (x: any): any; }, Symbol(foo5,Decl(anyAssignabilityInInheritance.ts,19,17),Decl(anyAssignabilityInInheritance.ts,21,37))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,22,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo6(x: RegExp): RegExp;
|
|
>foo6 : { (x: RegExp): RegExp; (x: any): any; }, Symbol(foo6,Decl(anyAssignabilityInInheritance.ts,23,17),Decl(anyAssignabilityInInheritance.ts,25,41))
|
|
>x : RegExp, Symbol(x,Decl(anyAssignabilityInInheritance.ts,25,22))
|
|
>RegExp : RegExp, Symbol(RegExp,Decl(lib.d.ts,825,1),Decl(lib.d.ts,876,11))
|
|
>RegExp : RegExp, Symbol(RegExp,Decl(lib.d.ts,825,1),Decl(lib.d.ts,876,11))
|
|
|
|
declare function foo6(x: any): any;
|
|
>foo6 : { (x: RegExp): RegExp; (x: any): any; }, Symbol(foo6,Decl(anyAssignabilityInInheritance.ts,23,17),Decl(anyAssignabilityInInheritance.ts,25,41))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,26,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo7(x: { bar: number }): { bar: number };
|
|
>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; }, Symbol(foo7,Decl(anyAssignabilityInInheritance.ts,27,17),Decl(anyAssignabilityInInheritance.ts,29,59))
|
|
>x : { bar: number; }, Symbol(x,Decl(anyAssignabilityInInheritance.ts,29,22))
|
|
>bar : number, Symbol(bar,Decl(anyAssignabilityInInheritance.ts,29,26))
|
|
>bar : number, Symbol(bar,Decl(anyAssignabilityInInheritance.ts,29,44))
|
|
|
|
declare function foo7(x: any): any;
|
|
>foo7 : { (x: { bar: number; }): { bar: number; }; (x: any): any; }, Symbol(foo7,Decl(anyAssignabilityInInheritance.ts,27,17),Decl(anyAssignabilityInInheritance.ts,29,59))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,30,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo8(x: number[]): number[];
|
|
>foo8 : { (x: number[]): number[]; (x: any): any; }, Symbol(foo8,Decl(anyAssignabilityInInheritance.ts,31,17),Decl(anyAssignabilityInInheritance.ts,33,45))
|
|
>x : number[], Symbol(x,Decl(anyAssignabilityInInheritance.ts,33,22))
|
|
|
|
declare function foo8(x: any): any;
|
|
>foo8 : { (x: number[]): number[]; (x: any): any; }, Symbol(foo8,Decl(anyAssignabilityInInheritance.ts,31,17),Decl(anyAssignabilityInInheritance.ts,33,45))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,34,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
interface I8 { foo: string }
|
|
>I8 : I8, Symbol(I8,Decl(anyAssignabilityInInheritance.ts,35,17))
|
|
>foo : string, Symbol(foo,Decl(anyAssignabilityInInheritance.ts,37,14))
|
|
|
|
declare function foo9(x: I8): I8;
|
|
>foo9 : { (x: I8): I8; (x: any): any; }, Symbol(foo9,Decl(anyAssignabilityInInheritance.ts,37,28),Decl(anyAssignabilityInInheritance.ts,38,33))
|
|
>x : I8, Symbol(x,Decl(anyAssignabilityInInheritance.ts,38,22))
|
|
>I8 : I8, Symbol(I8,Decl(anyAssignabilityInInheritance.ts,35,17))
|
|
>I8 : I8, Symbol(I8,Decl(anyAssignabilityInInheritance.ts,35,17))
|
|
|
|
declare function foo9(x: any): any;
|
|
>foo9 : { (x: I8): I8; (x: any): any; }, Symbol(foo9,Decl(anyAssignabilityInInheritance.ts,37,28),Decl(anyAssignabilityInInheritance.ts,38,33))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,39,22))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
class A { foo: number; }
|
|
>A : A, Symbol(A,Decl(anyAssignabilityInInheritance.ts,40,17))
|
|
>foo : number, Symbol(foo,Decl(anyAssignabilityInInheritance.ts,42,9))
|
|
|
|
declare function foo10(x: A): A;
|
|
>foo10 : { (x: A): A; (x: any): any; }, Symbol(foo10,Decl(anyAssignabilityInInheritance.ts,42,24),Decl(anyAssignabilityInInheritance.ts,43,32))
|
|
>x : A, Symbol(x,Decl(anyAssignabilityInInheritance.ts,43,23))
|
|
>A : A, Symbol(A,Decl(anyAssignabilityInInheritance.ts,40,17))
|
|
>A : A, Symbol(A,Decl(anyAssignabilityInInheritance.ts,40,17))
|
|
|
|
declare function foo10(x: any): any;
|
|
>foo10 : { (x: A): A; (x: any): any; }, Symbol(foo10,Decl(anyAssignabilityInInheritance.ts,42,24),Decl(anyAssignabilityInInheritance.ts,43,32))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,44,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
class A2<T> { foo: T; }
|
|
>A2 : A2<T>, Symbol(A2,Decl(anyAssignabilityInInheritance.ts,45,17))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,47,9))
|
|
>foo : T, Symbol(foo,Decl(anyAssignabilityInInheritance.ts,47,13))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,47,9))
|
|
|
|
declare function foo11(x: A2<string>): A2<string>;
|
|
>foo11 : { (x: A2<string>): A2<string>; (x: any): any; }, Symbol(foo11,Decl(anyAssignabilityInInheritance.ts,47,23),Decl(anyAssignabilityInInheritance.ts,48,50))
|
|
>x : A2<string>, Symbol(x,Decl(anyAssignabilityInInheritance.ts,48,23))
|
|
>A2 : A2<T>, Symbol(A2,Decl(anyAssignabilityInInheritance.ts,45,17))
|
|
>A2 : A2<T>, Symbol(A2,Decl(anyAssignabilityInInheritance.ts,45,17))
|
|
|
|
declare function foo11(x: any): any;
|
|
>foo11 : { (x: A2<string>): A2<string>; (x: any): any; }, Symbol(foo11,Decl(anyAssignabilityInInheritance.ts,47,23),Decl(anyAssignabilityInInheritance.ts,48,50))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,49,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo12(x: (x) => number): (x) => number;
|
|
>foo12 : { (x: (x: any) => number): (x: any) => number; (x: any): any; }, Symbol(foo12,Decl(anyAssignabilityInInheritance.ts,50,17),Decl(anyAssignabilityInInheritance.ts,52,56))
|
|
>x : (x: any) => number, Symbol(x,Decl(anyAssignabilityInInheritance.ts,52,23))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,52,27))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,52,43))
|
|
|
|
declare function foo12(x: any): any;
|
|
>foo12 : { (x: (x: any) => number): (x: any) => number; (x: any): any; }, Symbol(foo12,Decl(anyAssignabilityInInheritance.ts,50,17),Decl(anyAssignabilityInInheritance.ts,52,56))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,53,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo13(x: <T>(x: T) => T): <T>(x: T) => T;
|
|
>foo13 : { (x: <T>(x: T) => T): <T>(x: T) => T; (x: any): any; }, Symbol(foo13,Decl(anyAssignabilityInInheritance.ts,54,17),Decl(anyAssignabilityInInheritance.ts,56,58))
|
|
>x : <T>(x: T) => T, Symbol(x,Decl(anyAssignabilityInInheritance.ts,56,23))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,27))
|
|
>x : T, Symbol(x,Decl(anyAssignabilityInInheritance.ts,56,30))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,27))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,27))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,44))
|
|
>x : T, Symbol(x,Decl(anyAssignabilityInInheritance.ts,56,47))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,44))
|
|
>T : T, Symbol(T,Decl(anyAssignabilityInInheritance.ts,56,44))
|
|
|
|
declare function foo13(x: any): any;
|
|
>foo13 : { (x: <T>(x: T) => T): <T>(x: T) => T; (x: any): any; }, Symbol(foo13,Decl(anyAssignabilityInInheritance.ts,54,17),Decl(anyAssignabilityInInheritance.ts,56,58))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,57,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
enum E { A }
|
|
>E : E, Symbol(E,Decl(anyAssignabilityInInheritance.ts,58,17))
|
|
>A : E, Symbol(E.A,Decl(anyAssignabilityInInheritance.ts,60,8))
|
|
|
|
declare function foo14(x: E): E;
|
|
>foo14 : { (x: E): E; (x: any): any; }, Symbol(foo14,Decl(anyAssignabilityInInheritance.ts,60,12),Decl(anyAssignabilityInInheritance.ts,61,32))
|
|
>x : E, Symbol(x,Decl(anyAssignabilityInInheritance.ts,61,23))
|
|
>E : E, Symbol(E,Decl(anyAssignabilityInInheritance.ts,58,17))
|
|
>E : E, Symbol(E,Decl(anyAssignabilityInInheritance.ts,58,17))
|
|
|
|
declare function foo14(x: any): any;
|
|
>foo14 : { (x: E): E; (x: any): any; }, Symbol(foo14,Decl(anyAssignabilityInInheritance.ts,60,12),Decl(anyAssignabilityInInheritance.ts,61,32))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,62,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
function f() { }
|
|
>f : typeof f, Symbol(f,Decl(anyAssignabilityInInheritance.ts,63,17),Decl(anyAssignabilityInInheritance.ts,65,16))
|
|
|
|
module f {
|
|
>f : typeof f, Symbol(f,Decl(anyAssignabilityInInheritance.ts,63,17),Decl(anyAssignabilityInInheritance.ts,65,16))
|
|
|
|
export var bar = 1;
|
|
>bar : number, Symbol(bar,Decl(anyAssignabilityInInheritance.ts,67,14))
|
|
>1 : number
|
|
}
|
|
declare function foo15(x: typeof f): typeof f;
|
|
>foo15 : { (x: typeof f): typeof f; (x: any): any; }, Symbol(foo15,Decl(anyAssignabilityInInheritance.ts,68,1),Decl(anyAssignabilityInInheritance.ts,69,46))
|
|
>x : typeof f, Symbol(x,Decl(anyAssignabilityInInheritance.ts,69,23))
|
|
>f : typeof f, Symbol(f,Decl(anyAssignabilityInInheritance.ts,63,17),Decl(anyAssignabilityInInheritance.ts,65,16))
|
|
>f : typeof f, Symbol(f,Decl(anyAssignabilityInInheritance.ts,63,17),Decl(anyAssignabilityInInheritance.ts,65,16))
|
|
|
|
declare function foo15(x: any): any;
|
|
>foo15 : { (x: typeof f): typeof f; (x: any): any; }, Symbol(foo15,Decl(anyAssignabilityInInheritance.ts,68,1),Decl(anyAssignabilityInInheritance.ts,69,46))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,70,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
class CC { baz: string }
|
|
>CC : CC, Symbol(CC,Decl(anyAssignabilityInInheritance.ts,71,17),Decl(anyAssignabilityInInheritance.ts,73,24))
|
|
>baz : string, Symbol(baz,Decl(anyAssignabilityInInheritance.ts,73,10))
|
|
|
|
module CC {
|
|
>CC : typeof CC, Symbol(CC,Decl(anyAssignabilityInInheritance.ts,71,17),Decl(anyAssignabilityInInheritance.ts,73,24))
|
|
|
|
export var bar = 1;
|
|
>bar : number, Symbol(bar,Decl(anyAssignabilityInInheritance.ts,75,14))
|
|
>1 : number
|
|
}
|
|
declare function foo16(x: CC): CC;
|
|
>foo16 : { (x: CC): CC; (x: any): any; }, Symbol(foo16,Decl(anyAssignabilityInInheritance.ts,76,1),Decl(anyAssignabilityInInheritance.ts,77,34))
|
|
>x : CC, Symbol(x,Decl(anyAssignabilityInInheritance.ts,77,23))
|
|
>CC : CC, Symbol(CC,Decl(anyAssignabilityInInheritance.ts,71,17),Decl(anyAssignabilityInInheritance.ts,73,24))
|
|
>CC : CC, Symbol(CC,Decl(anyAssignabilityInInheritance.ts,71,17),Decl(anyAssignabilityInInheritance.ts,73,24))
|
|
|
|
declare function foo16(x: any): any;
|
|
>foo16 : { (x: CC): CC; (x: any): any; }, Symbol(foo16,Decl(anyAssignabilityInInheritance.ts,76,1),Decl(anyAssignabilityInInheritance.ts,77,34))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,78,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo17(x: Object): Object;
|
|
>foo17 : { (x: Object): Object; (x: any): any; }, Symbol(foo17,Decl(anyAssignabilityInInheritance.ts,79,17),Decl(anyAssignabilityInInheritance.ts,81,42))
|
|
>x : Object, Symbol(x,Decl(anyAssignabilityInInheritance.ts,81,23))
|
|
>Object : Object, Symbol(Object,Decl(lib.d.ts,92,1),Decl(lib.d.ts,223,11))
|
|
>Object : Object, Symbol(Object,Decl(lib.d.ts,92,1),Decl(lib.d.ts,223,11))
|
|
|
|
declare function foo17(x: any): any;
|
|
>foo17 : { (x: Object): Object; (x: any): any; }, Symbol(foo17,Decl(anyAssignabilityInInheritance.ts,79,17),Decl(anyAssignabilityInInheritance.ts,81,42))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,82,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|
|
declare function foo18(x: {}): {};
|
|
>foo18 : { (x: {}): {}; (x: any): any; }, Symbol(foo18,Decl(anyAssignabilityInInheritance.ts,83,17),Decl(anyAssignabilityInInheritance.ts,85,34))
|
|
>x : {}, Symbol(x,Decl(anyAssignabilityInInheritance.ts,85,23))
|
|
|
|
declare function foo18(x: any): any;
|
|
>foo18 : { (x: {}): {}; (x: any): any; }, Symbol(foo18,Decl(anyAssignabilityInInheritance.ts,83,17),Decl(anyAssignabilityInInheritance.ts,85,34))
|
|
>x : any, Symbol(x,Decl(anyAssignabilityInInheritance.ts,86,23))
|
|
|
|
var r3 = foo3(a); // any
|
|
>r3 : any, Symbol(r3,Decl(anyAssignabilityInInheritance.ts,11,3),Decl(anyAssignabilityInInheritance.ts,15,3),Decl(anyAssignabilityInInheritance.ts,19,3),Decl(anyAssignabilityInInheritance.ts,23,3),Decl(anyAssignabilityInInheritance.ts,27,3),Decl(anyAssignabilityInInheritance.ts,31,3),Decl(anyAssignabilityInInheritance.ts,35,3),Decl(anyAssignabilityInInheritance.ts,40,3),Decl(anyAssignabilityInInheritance.ts,45,3),Decl(anyAssignabilityInInheritance.ts,50,3),Decl(anyAssignabilityInInheritance.ts,54,3),Decl(anyAssignabilityInInheritance.ts,58,3),Decl(anyAssignabilityInInheritance.ts,63,3),Decl(anyAssignabilityInInheritance.ts,71,3),Decl(anyAssignabilityInInheritance.ts,79,3),Decl(anyAssignabilityInInheritance.ts,83,3),Decl(anyAssignabilityInInheritance.ts,87,3))
|
|
>foo3(a) : any
|
|
>foo3 : { (x: string): string; (x: any): any; }, Symbol(foo3,Decl(anyAssignabilityInInheritance.ts,11,17),Decl(anyAssignabilityInInheritance.ts,13,41))
|
|
>a : any, Symbol(a,Decl(anyAssignabilityInInheritance.ts,7,3))
|
|
|