//// [nominalSubtypeCheckOfTypeParameter.ts] interface Tuple { first: T second: S } interface Sequence { hasNext(): boolean pop(): T zip(seq: Sequence): Sequence> } // error, despite the fact that the code explicitly says List extends Sequence, the current rules for infinitely expanding type references // perform nominal subtyping checks that allow variance for type arguments, but not nominal subtyping for the generic type itself interface List extends Sequence { getLength(): number zip(seq: Sequence): List> } //// [nominalSubtypeCheckOfTypeParameter.js]