Add tests

This commit is contained in:
Anders Hejlsberg
2018-03-25 11:33:24 -07:00
parent 7c0cc84abd
commit 8f860f672f

View File

@@ -34,18 +34,18 @@ function f3(a: Invariant<A>, b: Invariant<B>) {
// Repros from #22860
export class Option<T> {
class Opt<T> {
toVector(): Vector<T> {
return <any>undefined;
}
}
interface Seq<T> {
tail(): Option<Seq<T>>;
tail(): Opt<Seq<T>>;
}
class Vector<T> implements Seq<T> {
tail(): Option<Vector<T>> {
tail(): Opt<Vector<T>> {
return <any>undefined;
}
partition2<U extends T>(predicate:(v:T)=>v is U): [Vector<U>,Vector<Exclude<T, U>>];