==== tests/cases/compiler/genericMemberFunction.ts (8 errors) ====
export class BuildError{
public parent(): FileWithErrors {
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
}
export class FileWithErrors{
public errors(): BuildError[] {
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
return undefined;
}
public parent(): BuildResult {
~~~~~~~~~~~
!!! 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 {
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
a.b.c.d.e.f.g = 0;
~
!!! Cannot find name 'a'.
removedFiles.forEach((each: FileWithErrors) => {
~~~~~~~~~~~~
!!! Cannot find name 'removedFiles'.
~~~~~~~~~~~
!!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
this.removeFile(each);
~~~~~~~~~~
!!! Property 'removeFile' does not exist on type 'BuildResult'.
});
}
}