Update LKG

This commit is contained in:
Mohamed Hegazy 2016-05-25 12:27:29 -07:00
parent 473f40664b
commit 1e41af30fe
5 changed files with 11 additions and 13 deletions

View file

@ -18090,7 +18090,7 @@ var ts;
inferFromTypes(source, t);
}
}
if (target.flags & 16384 && typeParameterCount === 1) {
if (typeParameterCount === 1) {
inferiority++;
inferFromTypes(source, typeParameter);
inferiority--;

View file

@ -18854,7 +18854,7 @@ var ts;
inferFromTypes(source, t);
}
}
if (target.flags & 16384 && typeParameterCount === 1) {
if (typeParameterCount === 1) {
inferiority++;
inferFromTypes(source, typeParameter);
inferiority--;

View file

@ -18854,7 +18854,7 @@ var ts;
inferFromTypes(source, t);
}
}
if (target.flags & 16384 && typeParameterCount === 1) {
if (typeParameterCount === 1) {
inferiority++;
inferFromTypes(source, typeParameter);
inferiority--;

View file

@ -21958,11 +21958,10 @@ var ts;
inferFromTypes(source, t);
}
}
// Next, if target is a union type containing a single naked type parameter, make a
// secondary inference to that type parameter. We don't do this for intersection types
// because in a target type like Foo & T we don't know how which parts of the source type
// should be matched by Foo and which should be inferred to T.
if (target.flags & 16384 /* Union */ && typeParameterCount === 1) {
// Next, if target containings a single naked type parameter, make a secondary inference to that type
// parameter. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
if (typeParameterCount === 1) {
inferiority++;
inferFromTypes(source, typeParameter);
inferiority--;

View file

@ -21958,11 +21958,10 @@ var ts;
inferFromTypes(source, t);
}
}
// Next, if target is a union type containing a single naked type parameter, make a
// secondary inference to that type parameter. We don't do this for intersection types
// because in a target type like Foo & T we don't know how which parts of the source type
// should be matched by Foo and which should be inferred to T.
if (target.flags & 16384 /* Union */ && typeParameterCount === 1) {
// Next, if target containings a single naked type parameter, make a secondary inference to that type
// parameter. This gives meaningful results for union types in co-variant positions and intersection
// types in contra-variant positions (such as callback parameters).
if (typeParameterCount === 1) {
inferiority++;
inferFromTypes(source, typeParameter);
inferiority--;