This commit is contained in:
Anders Hejlsberg committed 2016-08-01 09:49:27 -07:00
1 parent fc85bc5a8a
commit 47f6bb2e26
1 file changed
+19
+19
View File
@@ -0,0 +1,19 @@
// @strictNullChecks: true
// Repro from #10041
(''.match(/ /) || []).map(s => s.toLowerCase());
// Similar cases
function f1() {
let x = ''.match(/ /);
let y = x || [];
let z = y.map(s => s.toLowerCase());
}
function f2() {
let x = ''.match(/ /);
let y = x ? x : [];
let z = y.map(s => s.toLowerCase());
}