36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberFunctionDeclarations/memberFunctionOverloadMixingStaticAndInstance.ts (8 errors) ====
|
|
class C {
|
|
foo();
|
|
static foo(); // error
|
|
~~~
|
|
!!! error TS2388: Function overload must not be static.
|
|
~~~
|
|
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
}
|
|
|
|
class D {
|
|
static foo();
|
|
foo(); // error
|
|
~~~
|
|
!!! error TS2387: Function overload must be static.
|
|
~~~
|
|
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
}
|
|
|
|
class E<T> {
|
|
foo(x: T);
|
|
static foo(x: number); // error
|
|
~~~
|
|
!!! error TS2388: Function overload must not be static.
|
|
~~~
|
|
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
}
|
|
|
|
class F<T> {
|
|
static foo(x: number);
|
|
foo(x: T); // error
|
|
~~~
|
|
!!! error TS2387: Function overload must be static.
|
|
~~~
|
|
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
} |