This commit is contained in:
Anders Hejlsberg 2016-10-13 09:44:37 -07:00
parent 1dedca73d1
commit 620b3f91e1
3 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ tests/cases/compiler/implicitAnyWidenToAny.ts(4,5): error TS7005: Variable 'wide
var widenArray = [null, undefined]; // error at "widenArray"
~~~~~~~~~~
!!! error TS7005: Variable 'widenArray' implicitly has an 'any[]' type.
var emptyArray = []; // error at "emptyArray"
var emptyArray = [];
// these should not be error
class AnimalObj {

View File

@ -3,7 +3,7 @@
var x = null; // error at "x"
var x1 = undefined; // error at "x1"
var widenArray = [null, undefined]; // error at "widenArray"
var emptyArray = []; // error at "emptyArray"
var emptyArray = [];
// these should not be error
class AnimalObj {
@ -32,7 +32,7 @@ var obj1 = anyReturnFunc();
var x = null; // error at "x"
var x1 = undefined; // error at "x1"
var widenArray = [null, undefined]; // error at "widenArray"
var emptyArray = []; // error at "emptyArray"
var emptyArray = [];
// these should not be error
var AnimalObj = (function () {
function AnimalObj() {

View File

@ -3,7 +3,7 @@
var x = null; // error at "x"
var x1 = undefined; // error at "x1"
var widenArray = [null, undefined]; // error at "widenArray"
var emptyArray = []; // error at "emptyArray"
var emptyArray = [];
// these should not be error
class AnimalObj {