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.
122 lines
1.8 KiB
Text
122 lines
1.8 KiB
Text
=== tests/cases/conformance/expressions/binaryOperators/logicalOrOperator/logicalOrOperatorWithTypeParameters.ts ===
|
|
function fn1<T, U>(t: T, u: U) {
|
|
>fn1 : <T, U>(t: T, u: U) => void
|
|
>T : T
|
|
>U : U
|
|
>t : T
|
|
>T : T
|
|
>u : U
|
|
>U : U
|
|
|
|
var r1 = t || t;
|
|
>r1 : T
|
|
>t || t : T
|
|
>t : T
|
|
>t : T
|
|
|
|
var r2: T = t || t;
|
|
>r2 : T
|
|
>T : T
|
|
>t || t : T
|
|
>t : T
|
|
>t : T
|
|
|
|
var r3 = t || u;
|
|
>r3 : T | U
|
|
>t || u : T | U
|
|
>t : T
|
|
>u : U
|
|
|
|
var r4: {} = t || u;
|
|
>r4 : {}
|
|
>t || u : {}
|
|
>t : T
|
|
>u : U
|
|
}
|
|
|
|
function fn2<T, U/* extends T*/, V/* extends T*/>(t: T, u: U, v: V) {
|
|
>fn2 : <T, U, V>(t: T, u: U, v: V) => void
|
|
>T : T
|
|
>U : U
|
|
>V : V
|
|
>t : T
|
|
>T : T
|
|
>u : U
|
|
>U : U
|
|
>v : V
|
|
>V : V
|
|
|
|
var r1 = t || u;
|
|
>r1 : T | U
|
|
>t || u : T | U
|
|
>t : T
|
|
>u : U
|
|
|
|
//var r2: T = t || u;
|
|
var r3 = u || u;
|
|
>r3 : U
|
|
>u || u : U
|
|
>u : U
|
|
>u : U
|
|
|
|
var r4: U = u || u;
|
|
>r4 : U
|
|
>U : U
|
|
>u || u : U
|
|
>u : U
|
|
>u : U
|
|
|
|
var r5 = u || v;
|
|
>r5 : U | V
|
|
>u || v : U | V
|
|
>u : U
|
|
>v : V
|
|
|
|
var r6: {} = u || v;
|
|
>r6 : {}
|
|
>u || v : {}
|
|
>u : U
|
|
>v : V
|
|
|
|
//var r7: T = u || v;
|
|
}
|
|
|
|
function fn3<T extends { a: string; b: string }, U extends { a: string; b: number }>(t: T, u: U) {
|
|
>fn3 : <T extends { a: string; b: string; }, U extends { a: string; b: number; }>(t: T, u: U) => void
|
|
>T : T
|
|
>a : string
|
|
>b : string
|
|
>U : U
|
|
>a : string
|
|
>b : number
|
|
>t : T
|
|
>T : T
|
|
>u : U
|
|
>U : U
|
|
|
|
var r1 = t || u;
|
|
>r1 : T | U
|
|
>t || u : T | U
|
|
>t : T
|
|
>u : U
|
|
|
|
var r2: {} = t || u;
|
|
>r2 : {}
|
|
>t || u : {}
|
|
>t : T
|
|
>u : U
|
|
|
|
var r3 = t || { a: '' };
|
|
>r3 : { a: string; }
|
|
>t || { a: '' } : { a: string; }
|
|
>t : T
|
|
>{ a: '' } : { a: string; }
|
|
>a : string
|
|
|
|
var r4: { a: string } = t || u;
|
|
>r4 : { a: string; }
|
|
>a : string
|
|
>t || u : { a: string; }
|
|
>t : T
|
|
>u : U
|
|
}
|