2014-09-18 02:05:45 +02:00
|
|
|
tests/cases/compiler/overloadModifiersMustAgree.ts(2,12): error TS2385: Overload signatures must all be public, private or protected.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/overloadModifiersMustAgree.ts(6,18): error TS2384: Overload signatures must all be ambient or non-ambient.
|
|
|
|
tests/cases/compiler/overloadModifiersMustAgree.ts(7,17): error TS2383: Overload signatures must all be exported or not exported.
|
|
|
|
tests/cases/compiler/overloadModifiersMustAgree.ts(12,5): error TS2386: Overload signatures must all be optional or required.
|
|
|
|
|
|
|
|
|
2014-07-31 01:27:13 +02:00
|
|
|
==== tests/cases/compiler/overloadModifiersMustAgree.ts (4 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class baz {
|
|
|
|
public foo();
|
|
|
|
~~~
|
2014-09-18 02:05:45 +02:00
|
|
|
!!! error TS2385: Overload signatures must all be public, private or protected.
|
2014-07-13 01:04:16 +02:00
|
|
|
private foo(bar?: any) { } // error - access modifiers do not agree
|
|
|
|
}
|
|
|
|
|
|
|
|
declare function bar();
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2384: Overload signatures must all be ambient or non-ambient.
|
2014-07-13 01:04:16 +02:00
|
|
|
export function bar(s: string);
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2383: Overload signatures must all be exported or not exported.
|
2014-07-13 01:04:16 +02:00
|
|
|
function bar(s?: string) { }
|
|
|
|
|
|
|
|
interface I {
|
|
|
|
foo? ();
|
|
|
|
foo(s: string);
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2386: Overload signatures must all be optional or required.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|