TypeScript/tests/baselines/reference/circularBaseTypes.types
Anders Hejlsberg 94d6b4507e
Consistent errors on circular base types (#39675)
* Properly track and report errors on circular base types

* Accept new baselines

* Add regression test
2020-07-20 20:35:47 -07:00

22 lines
336 B
Plaintext

=== tests/cases/compiler/circularBaseTypes.ts ===
// Repro from #38098
type M<T> = { value: T };
>M : M<T>
>value : T
interface M2 extends M<M3> {}; // Error
type M3 = M2[keyof M2]; // Error
>M3 : any
function f(m: M3) {
>f : (m: any) => any
>m : any
return m.value;
>m.value : any
>m : any
>value : any
}