==== tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts (5 errors) ==== // Function call whose argument is a 1 arg generic function call with explicit type arguments function fn1(t: T) { } function fn2(t: any) { } fn1(fn2(4)); // Error ~~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. var a: any; var s: string; // Type assertion of non - unary expression var a = "" + 4; var s = "" + 4; class SomeBase { private p; } class SomeDerived extends SomeBase { private x; } class SomeOther { private q; } // Type assertion should check for assignability in either direction var someBase = new SomeBase(); var someDerived = new SomeDerived(); var someOther = new SomeOther(); someBase = someDerived; someBase = someBase; someBase = someOther; // Error ~~~~~~~~~~~~~~~~~~~ !!! Neither type 'SomeBase' nor type 'SomeOther' is assignable to the other. someDerived = someDerived; someDerived = someBase; someDerived = someOther; // Error ~~~~~~~~~~~~~~~~~~~~~~ !!! Neither type 'SomeDerived' nor type 'SomeOther' is assignable to the other. someOther = someDerived; // Error ~~~~~~~~~~~~~~~~~~~~~~ !!! Neither type 'SomeOther' nor type 'SomeDerived' is assignable to the other. someOther = someBase; // Error ~~~~~~~~~~~~~~~~~~~ !!! Neither type 'SomeOther' nor type 'SomeBase' is assignable to the other. someOther = someOther;