TypeScript/tests/baselines/reference/overloadsWithinClasses.errors.txt

32 lines
894 B
Plaintext
Raw Normal View History

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-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
~~~~~~~~~~
!!! 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 {
}
}