File: typeParameterFixingWithContextSensitiveArguments3.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (15 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts(7,35): error TS2741: Property 'b' is missing in type 'A' but required in type 'B'.


==== tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts (1 errors) ====
    function f<T, U>(t1: T, u1: U, pf1: (u2: U) => T, pf2: (t2: T) => U): [T, U] { return [t1, pf2(t1)]; }
    interface A { a: A; }
    interface B extends A { b: B; }
    
    var a: A, b: B;
    
    var d = f(a, b, u2 => u2.b, t2 => t2);
                                      ~~
!!! error TS2741: Property 'b' is missing in type 'A' but required in type 'B'.
!!! related TS2728 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:3:25: 'b' is declared here.
!!! related TS6502 tests/cases/compiler/typeParameterFixingWithContextSensitiveArguments3.ts:1:56: The expected type comes from the return type of this signature.