2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/createArray.ts(1,12): error TS2304: Cannot find name 'number'.
|
2014-11-29 23:51:25 +01:00
|
|
|
tests/cases/compiler/createArray.ts(1,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
|
|
|
tests/cases/compiler/createArray.ts(6,6): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/createArray.ts(7,12): error TS2304: Cannot find name 'boolean'.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/createArray.ts(7,19): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/createArray.ts(8,12): error TS2304: Cannot find name 'string'.
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/createArray.ts (7 errors) ====
|
|
|
|
var na=new number[];
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'number'.
|
2014-12-17 00:56:56 +01:00
|
|
|
~~
|
|
|
|
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
class C {
|
|
|
|
}
|
|
|
|
|
|
|
|
new C[];
|
2014-11-29 23:51:25 +01:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-07-13 01:04:16 +02:00
|
|
|
var ba=new boolean[];
|
|
|
|
~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'boolean'.
|
2014-12-17 00:56:56 +01:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-12-17 00:56:56 +01:00
|
|
|
var sa=new string[];
|
2014-07-13 01:04:16 +02:00
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'string'.
|
2014-12-17 00:56:56 +01:00
|
|
|
~~
|
|
|
|
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
2014-07-13 01:04:16 +02:00
|
|
|
function f(s:string):number { return 0;
|
|
|
|
}
|
|
|
|
if (ba[14]) {
|
|
|
|
na[2]=f(sa[3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
new C[1]; // not an error
|