tests/cases/compiler/genericMemberFunction.ts(2,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericMemberFunction.ts(7,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericMemberFunction.ts(10,20): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericMemberFunction.ts(15,19): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericMemberFunction.ts(16,5): error TS2304: Cannot find name 'a'.
tests/cases/compiler/genericMemberFunction.ts(17,5): error TS2304: Cannot find name 'removedFiles'.
tests/cases/compiler/genericMemberFunction.ts(17,30): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
tests/cases/compiler/genericMemberFunction.ts(18,12): error TS2339: Property 'removeFile' does not exist on type 'BuildResult'.
==== tests/cases/compiler/genericMemberFunction.ts (8 errors) ====
export class BuildError{
public parent(): FileWithErrors {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
}
export class FileWithErrors{
public errors(): BuildError[] {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
public parent(): BuildResult {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
}
export class BuildResult{
public merge(other: BuildResult): void {
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
a.b.c.d.e.f.g = 0;
~
!!! error TS2304: Cannot find name 'a'.
removedFiles.forEach((each: FileWithErrors) => {
~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'removedFiles'.
~~~~~~~~~~~
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
this.removeFile(each);
~~~~~~~~~~
!!! error TS2339: Property 'removeFile' does not exist on type 'BuildResult'.
});
}
}