interface V { v: number; } interface C { c: number; } interface I { m0(y: Y): V; // ^ defined: 9 // ^ defined: 8 m1(y: Y): Y; // ^ defined: 9 // ^ defined: 8 m2(y: Y): X; // ^ defined: 9 // ^ defined: 8 } { let x: I; // ^ defined: 8 // ^ defined: 1 x.m0(null).v; //^ defined: 21 // ^ defined: 9 // ^ defined: 4 // ^ defined: 2 x.m1(null).c; //^ defined: 21 // ^ defined: 12 // ^ defined: 4 // ^ defined: 5 x.m2(null).v; //^ defined: 21 // ^ defined: 15 // ^ defined: 4 // ^ defined: 2 x.m2(null).c; // tsc: Property 'c' does not exist on type 'V'. //^ defined: 21 // ^ defined: 15 // ^ defined: 4 // ^ defined: } interface E { e: {}; } interface A { f: I; g

(): I

; } { let x: A; // ^ defined: 52 // ^ defined: 1 x.f.m0(null).v; //^ defined: 61 // ^ defined: 54 // ^ defined: 9 // ^ defined: 4 // ^ defined: 2 x.f.m1(null).c; //^ defined: 61 // ^ defined: 54 // ^ defined: 12 // ^ defined: 4 // ^ defined: 5 x.f.m2(null).v; //^ defined: 61 // ^ defined: 54 // ^ defined: 15 // ^ defined: 4 // ^ defined: 2 x.f.m2(null).c; // tsc: Property 'c' does not exist on type 'V'. //^ defined: 61 // ^ defined: 54 // ^ defined: 15 // ^ defined: 4 // ^ defined: x.g().m0(null).v; //^ defined: 61 // ^ defined: 56 // ^ defined: 50 // ^ defined: 9 // ^ defined: 4 // ^ defined: 2 x.g().m1(null).c; //^ defined: 61 // ^ defined: 56 // ^ defined: 50 // ^ defined: 12 // ^ defined: 4 // ^ defined: 5 x.g().m2(null).e; //^ defined: 61 // ^ defined: 56 // ^ defined: 50 // ^ defined: 15 // ^ defined: 4 // ^ defined: 50 x.g().m2(null).e; // tsc: Property 'c' does not exist on type 'V'. //^ defined: 61 // ^ defined: 56 // ^ defined: 50 // ^ defined: 15 // ^ defined: 4 // ^ defined: } export {}