25 lines
404 B
Text
25 lines
404 B
Text
=== tests/cases/compiler/assignmentCompatibilityForConstrainedTypeParameters.ts ===
|
|
function foo<T extends { bar: string }>() {
|
|
>foo : <T extends { bar: string; }>() => void
|
|
>T : T
|
|
>bar : string
|
|
|
|
function bar<S extends T>() {
|
|
>bar : <S extends T>() => void
|
|
>S : S
|
|
>T : T
|
|
|
|
var x: S;
|
|
>x : S
|
|
>S : S
|
|
|
|
var y: T;
|
|
>y : T
|
|
>T : T
|
|
|
|
y = x;
|
|
>y = x : S
|
|
>y : T
|
|
>x : S
|
|
}
|
|
}
|