mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
424 B
TypeScript
27 lines
424 B
TypeScript
// @noEmit: true
|
|
|
|
// https://github.com/microsoft/typescript-go/pull/4820
|
|
|
|
type Bar<U> = (x: Baz<U[]>) => void;
|
|
|
|
type Baz<V> = {
|
|
value: Foo<V[]>;
|
|
}
|
|
|
|
type Foo<T> = {
|
|
x: T;
|
|
f: Bar<T>;
|
|
}
|
|
|
|
declare let foo1: Foo<unknown>;
|
|
declare let foo2: Foo<string>;
|
|
|
|
foo1 = foo2;
|
|
foo2 = foo1; // Error
|
|
|
|
declare let bar1: Bar<unknown>;
|
|
declare let bar2: Bar<string>;
|
|
|
|
bar1 = bar2; // Error
|
|
bar2 = bar1;
|