2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/compiler/overloadsWithinClasses.ts(3,12): error TS2393: Duplicate function implementation.
|
|
|
|
tests/cases/compiler/overloadsWithinClasses.ts(5,12): error TS2393: Duplicate function implementation.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/compiler/overloadsWithinClasses.ts (2 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class foo {
|
|
|
|
|
|
|
|
static fnOverload( ) {}
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~~~~~~~
|
2014-10-01 02:15:18 +02:00
|
|
|
!!! error TS2393: Duplicate function implementation.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
static fnOverload(foo: string){ } // error
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2393: Duplicate function implementation.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class bar {
|
|
|
|
|
|
|
|
static fnOverload( );
|
|
|
|
|
|
|
|
static fnOverload(foo?: string){ } // no error
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class X {
|
|
|
|
public attr(name:string):string;
|
|
|
|
public attr(name:string, value:string):X;
|
|
|
|
public attr(first:any, second?:any):any {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|