Added tests.

This commit is contained in:
Daniel Rosenwasser 2016-02-23 19:59:16 -08:00
parent 804e8b9abf
commit eb1a70cd16
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,24 @@
interface A {
a;
}
interface B {
b;
}
function f<T, U extends A, V extends U>(): void {
let t: T;
let u: U;
let v: V;
let a_and_b: A & B;
let t_and_b: T & B;
t = a_and_b;
u = a_and_b;
v = a_and_b;
t = t_and_b;
u = t_and_b;
v = t_and_b;
}

View file

@ -0,0 +1,22 @@
interface A {
a;
}
interface B {
b;
}
function f<T, U extends A, V extends U>(): void {
let num: number;
let bool: boolean;
let str: string;
let a_and_b: A & B;
let num_and_bool: number & boolean;
num = a_and_b;
bool = a_and_b;
str = a_and_b;
str = num_and_bool;
}