83 lines
4.8 KiB
Plaintext
83 lines
4.8 KiB
Plaintext
=== tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunction.ts ===
|
|
// object types with call signatures can override members of Function
|
|
// no errors expected below
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 0, 0))
|
|
|
|
(): void;
|
|
apply(a: any, b?: any): void;
|
|
>apply : Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
>a : Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 10))
|
|
>b : Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 17))
|
|
|
|
call(thisArg: number, ...argArray: number[]): any;
|
|
>call : Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
>thisArg : Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 6, 9))
|
|
>argArray : Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 6, 25))
|
|
}
|
|
|
|
var i: I;
|
|
>i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>I : Symbol(I, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 0, 0))
|
|
|
|
var r1: (a: any, b?: any) => void = i.apply;
|
|
>r1 : Symbol(r1, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 3))
|
|
>a : Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 9))
|
|
>b : Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 10, 16))
|
|
>i.apply : Symbol(I.apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
>i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>apply : Symbol(I.apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 4, 13))
|
|
|
|
var r1b: (thisArg: number, ...argArray: number[]) => void = i.call;
|
|
>r1b : Symbol(r1b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 3))
|
|
>thisArg : Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 10))
|
|
>argArray : Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 11, 26))
|
|
>i.call : Symbol(I.call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
>i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>call : Symbol(I.call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 5, 33))
|
|
|
|
var r1c = i.arguments;
|
|
>r1c : Symbol(r1c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 12, 3))
|
|
>i.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
>i : Symbol(i, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 9, 3))
|
|
>arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
|
|
var x: {
|
|
>x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
|
|
(): void;
|
|
apply(a: any, b?: any): void;
|
|
>apply : Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
>a : Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 10))
|
|
>b : Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 17))
|
|
|
|
call(thisArg: number, ...argArray: number[]): any;
|
|
>call : Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
>thisArg : Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 17, 9))
|
|
>argArray : Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 17, 25))
|
|
}
|
|
|
|
var r2: (a: any, b?: any) => void = x.apply;
|
|
>r2 : Symbol(r2, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 3))
|
|
>a : Symbol(a, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 9))
|
|
>b : Symbol(b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 20, 16))
|
|
>x.apply : Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
>x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>apply : Symbol(apply, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 15, 13))
|
|
|
|
var r2b: (thisArg: number, ...argArray: number[]) => void = x.call;
|
|
>r2b : Symbol(r2b, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 3))
|
|
>thisArg : Symbol(thisArg, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 10))
|
|
>argArray : Symbol(argArray, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 21, 26))
|
|
>x.call : Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
>x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>call : Symbol(call, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 16, 33))
|
|
|
|
var r2c = x.arguments;
|
|
>r2c : Symbol(r2c, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 22, 3))
|
|
>x.arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
>x : Symbol(x, Decl(objectTypeWithCallSignatureHidingMembersOfFunction.ts, 14, 3))
|
|
>arguments : Symbol(Function.arguments, Decl(lib.d.ts, 252, 19))
|
|
|