The new baselines all look correct to me, but obviously a number of the tests need to be updated to reflect union types and the new behavior of best common type. This commit does not cover that.
27 lines
No EOL
777 B
Text
27 lines
No EOL
777 B
Text
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts(20,9): error TS2346: Supplied parameters do not match any signature of call target.
|
|
|
|
|
|
==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts (1 errors) ====
|
|
class C {
|
|
private x: string;
|
|
}
|
|
|
|
class D {
|
|
private x: string;
|
|
}
|
|
|
|
class X<T> {
|
|
x: T;
|
|
}
|
|
|
|
function foo<T>(t: X<T>, t2: X<T>) {
|
|
var x: T;
|
|
return x;
|
|
}
|
|
|
|
var c1 = new X<C>();
|
|
var d1 = new X<D>();
|
|
var r = foo(c1, d1); // error
|
|
~~~~~~~~~~~
|
|
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
|
var r2 = foo(c1, c1); // ok |