TypeScript/tests/baselines/reference/memberFunctionsWithPublicPrivateOverloads.errors.txt
2014-09-17 17:05:45 -07:00

78 lines
No EOL
4.6 KiB
Text

tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(3,12): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(7,12): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(12,19): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(16,19): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(23,12): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(27,12): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(32,19): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(36,19): error TS2385: Overload signatures must all be public, private or protected.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(42,9): error TS2341: Property 'C.foo' is inaccessible.
tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts(45,10): error TS2341: Property 'D.foo' is inaccessible.
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionsWithPublicPrivateOverloads.ts (10 errors) ====
class C {
private foo(x: number);
public foo(x: number, y: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private foo(x: any, y?: any) { }
private bar(x: 'hi');
public bar(x: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private bar(x: number, y: string);
private bar(x: any, y?: any) { }
private static foo(x: number);
public static foo(x: number, y: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private static foo(x: any, y?: any) { }
private static bar(x: 'hi');
public static bar(x: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private static bar(x: number, y: string);
private static bar(x: any, y?: any) { }
}
class D<T> {
private foo(x: number);
public foo(x: T, y: T); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private foo(x: any, y?: any) { }
private bar(x: 'hi');
public bar(x: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private bar(x: T, y: T);
private bar(x: any, y?: any) { }
private static foo(x: number);
public static foo(x: number, y: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private static foo(x: any, y?: any) { }
private static bar(x: 'hi');
public static bar(x: string); // error
~~~
!!! error TS2385: Overload signatures must all be public, private or protected.
private static bar(x: number, y: string);
private static bar(x: any, y?: any) { }
}
var c: C;
var r = c.foo(1); // error
~~~~~
!!! error TS2341: Property 'C.foo' is inaccessible.
var d: D<number>;
var r2 = d.foo(2); // error
~~~~~
!!! error TS2341: Property 'D.foo' is inaccessible.