2014-11-29 23:51:25 +01:00
|
|
|
tests/cases/compiler/badArraySyntax.ts(6,15): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
|
|
|
tests/cases/compiler/badArraySyntax.ts(7,15): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
|
|
|
tests/cases/compiler/badArraySyntax.ts(8,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
|
|
|
tests/cases/compiler/badArraySyntax.ts(9,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
|
|
|
tests/cases/compiler/badArraySyntax.ts(10,40): 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-11-20 03:36:05 +01:00
|
|
|
==== tests/cases/compiler/badArraySyntax.ts (5 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class Z {
|
|
|
|
public x = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
var a1: Z[] = [];
|
|
|
|
var a2 = new Z[];
|
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 a3 = new Z[]();
|
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 a4: Z[] = new Z[];
|
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 a5: Z[] = new Z[]();
|
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 a6: Z[][] = new Z [ ] [ ];
|
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
|
|
|
|