File: genericMemberFunction.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (34 lines) | stat: -rw-r--r-- 1,345 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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(18,12): error TS2339: Property 'removeFile' does not exist on type 'BuildResult<A, B, C>'.


==== tests/cases/compiler/genericMemberFunction.ts (3 errors) ====
    export class BuildError<A, B, C>{
      public parent<A, B extends A, C>(): FileWithErrors<A, B, C> {
        return undefined;
      }
    }
    export class FileWithErrors<A, B, C>{
      public errors<A, B extends A, C>(): BuildError<A, B, C>[] {
        return undefined;
      }
      public parent<A, B extends A, C>(): BuildResult<A, B, C> {
        return undefined;
      }
    }
    export class BuildResult<A, B, C>{
      public merge<A, B extends A, C>(other: BuildResult<A, B, C>): void {
        a.b.c.d.e.f.g = 0;
        ~
!!! error TS2304: Cannot find name 'a'.
        removedFiles.forEach(<A, B extends A, C>(each: FileWithErrors<A, B, C>) => {
        ~~~~~~~~~~~~
!!! error TS2304: Cannot find name 'removedFiles'.
          this.removeFile(each);
               ~~~~~~~~~~
!!! error TS2339: Property 'removeFile' does not exist on type 'BuildResult<A, B, C>'.
        });
      }
    }