==== tests/cases/compiler/returnTypeTypeArguments.ts (37 errors) ==== class One{ value: T; } class Two{ value: T; id: U; } class Three{ value: T; id: U; name: V; } function A1(): One { return null; } ~~~ !!! Generic type 'One' requires 1 type argument(s). function A2(): Two { return null; } ~~~ !!! Generic type 'Two' requires 2 type argument(s). function A3(): Three { return null; } ~~~~~ !!! Generic type 'Three' requires 3 type argument(s). function B1(): Two { return null; } ~~~~~~~~~~~ !!! Generic type 'Two' requires 2 type argument(s). function B2(): Three { return null; } ~~~~~~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). function B3(): Three { return null; } ~~~~~~~~~~~~~~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). class C { A1(): One { return null; } ~~~ !!! Generic type 'One' requires 1 type argument(s). A2(): Two { return null; } ~~~ !!! Generic type 'Two' requires 2 type argument(s). A3(): Three { return null; } ~~~~~ !!! Generic type 'Three' requires 3 type argument(s). B1(): Two { return null; } ~~~~~~~~~~~ !!! Generic type 'Two' requires 2 type argument(s). B2(): Three { return null; } ~~~~~~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). B3(): Three { return null; } ~~~~~~~~~~~~~~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). } class D { A2(): Two { return null; } ~~~~~~ !!! Generic type 'Two' requires 2 type argument(s). A3(): Three { return null; } ~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). B1(): Two { return null; } ~~~~~~ !!! Generic type 'Two' requires 2 type argument(s). B2(): Three { return null; } ~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). B3(): Three { return null; } ~~~~~~~~~~~~~~~~ !!! Generic type 'Three' requires 3 type argument(s). } interface I { value: T; } class Y { value: T; } class X { p1: () => X; ~ !!! Generic type 'X' requires 1 type argument(s). p2: { [idx: number]: X } ~ !!! Generic type 'X' requires 1 type argument(s). p3: X[] ~ !!! Generic type 'X' requires 1 type argument(s). p4: I ~ !!! Generic type 'X' requires 1 type argument(s). p5: X ~ !!! Generic type 'X' requires 1 type argument(s). p6: () => Y; ~ !!! Generic type 'Y' requires 1 type argument(s). p7: { [idx: number]: Y } ~ !!! Generic type 'Y' requires 1 type argument(s). p8: Y[] ~ !!! Generic type 'Y' requires 1 type argument(s). p9: I ~ !!! Generic type 'Y' requires 1 type argument(s). pa: Y ~ !!! Generic type 'Y' requires 1 type argument(s). } declare var a: { p1: () => X; ~ !!! Generic type 'X' requires 1 type argument(s). p2: { [idx: number]: X } ~ !!! Generic type 'X' requires 1 type argument(s). p3: X[] ~ !!! Generic type 'X' requires 1 type argument(s). p4: I ~ !!! Generic type 'X' requires 1 type argument(s). p5: X ~ !!! Generic type 'X' requires 1 type argument(s). p6: () => Y; ~ !!! Generic type 'Y' requires 1 type argument(s). p7: { [idx: number]: Y } ~ !!! Generic type 'Y' requires 1 type argument(s). p8: Y[] ~ !!! Generic type 'Y' requires 1 type argument(s). p9: I ~ !!! Generic type 'Y' requires 1 type argument(s). pa: Y ~ !!! Generic type 'Y' requires 1 type argument(s). };