97 lines
1.5 KiB
Text
97 lines
1.5 KiB
Text
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/primtiveTypesAreIdentical.ts ===
|
|
// primitive types are identical to themselves so these overloads will all cause errors
|
|
|
|
function foo1(x: number);
|
|
>foo1 : typeof foo1
|
|
>x : number
|
|
|
|
function foo1(x: number);
|
|
>foo1 : typeof foo1
|
|
>x : number
|
|
|
|
function foo1(x: any) { }
|
|
>foo1 : typeof foo1
|
|
>x : any
|
|
|
|
function foo2(x: string);
|
|
>foo2 : typeof foo2
|
|
>x : string
|
|
|
|
function foo2(x: string);
|
|
>foo2 : typeof foo2
|
|
>x : string
|
|
|
|
function foo2(x: any) { }
|
|
>foo2 : typeof foo2
|
|
>x : any
|
|
|
|
function foo3(x: boolean);
|
|
>foo3 : typeof foo3
|
|
>x : boolean
|
|
|
|
function foo3(x: boolean);
|
|
>foo3 : typeof foo3
|
|
>x : boolean
|
|
|
|
function foo3(x: any) { }
|
|
>foo3 : typeof foo3
|
|
>x : any
|
|
|
|
function foo4(x: any);
|
|
>foo4 : typeof foo4
|
|
>x : any
|
|
|
|
function foo4(x: any);
|
|
>foo4 : typeof foo4
|
|
>x : any
|
|
|
|
function foo4(x: any) { }
|
|
>foo4 : typeof foo4
|
|
>x : any
|
|
|
|
function foo5(x: 'a');
|
|
>foo5 : typeof foo5
|
|
>x : 'a'
|
|
|
|
function foo5(x: 'a');
|
|
>foo5 : typeof foo5
|
|
>x : 'a'
|
|
|
|
function foo5(x: string);
|
|
>foo5 : typeof foo5
|
|
>x : string
|
|
|
|
function foo5(x: any) { }
|
|
>foo5 : typeof foo5
|
|
>x : any
|
|
|
|
enum E { A }
|
|
>E : E
|
|
>A : E
|
|
|
|
function foo6(x: E);
|
|
>foo6 : typeof foo6
|
|
>x : E
|
|
>E : E
|
|
|
|
function foo6(x: E);
|
|
>foo6 : typeof foo6
|
|
>x : E
|
|
>E : E
|
|
|
|
function foo6(x: any) { }
|
|
>foo6 : typeof foo6
|
|
>x : any
|
|
|
|
function foo7(x: void);
|
|
>foo7 : typeof foo7
|
|
>x : void
|
|
|
|
function foo7(x: void);
|
|
>foo7 : typeof foo7
|
|
>x : void
|
|
|
|
function foo7(x: any) { }
|
|
>foo7 : typeof foo7
|
|
>x : any
|
|
|