Add regression tests

This commit is contained in:
Anders Hejlsberg
2018-01-11 16:45:44 -08:00
parent 6b882c7b39
commit 13bf022ef6

View File

@@ -17,3 +17,13 @@ const x1 = f1(fo, fs); // (x: string) => void
const x2 = f2("abc", fo, fs); // "abc"
const x3 = f3("abc", fo, fx); // "abc" | "def"
const x4 = f4(fo, fs); // Func<string>
declare const never: never;
const x10 = f2(never, fo, fs); // string
const x11 = f3(never, fo, fx); // "def"
// Repro from #21112
declare function foo<T>(a: ReadonlyArray<T>): T;
let x = foo([]); // never