Update tests

This commit is contained in:
Anders Hejlsberg committed 2016-10-13 13:29:08 -07:00
1 parent bf301e9ccc
commit bfa4197ffe
2 files changed
+13 -7

No files matched your search

@@ -3,16 +3,16 @@
declare function cond(): boolean;
function f1() {
let x = [];
let y = x; // Implicit any[] error
let x = []; // Implicit any[] error in some locations
let y = x; // Implicit any[] error
x.push(5);
let z = x;
}
function f2() {
let x;
let x; // Implicit any[] error in some locations
x = [];
let y = x; // Implicit any[] error
let y = x; // Implicit any[] error
x.push(5);
let z = x;
}
@@ -21,7 +21,7 @@ function f3() {
let x = []; // Implicit any[] error in some locations
x.push(5);
function g() {
x; // Implicit any[] error
x; // Implicit any[] error
}
}
+8 -2
View File
@@ -115,13 +115,19 @@ function f10() {
function f11() {
let x = [];
return x; // never[]
if (x.length === 0) { // x.length ok on implicit any[]
x.push("hello");
}
return x;
}
function f12() {
let x;
x = [];
return x; // never[]
if (x.length === 0) { // x.length ok on implicit any[]
x.push("hello");
}
return x;
}
function f13() {