TypeScript/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt
Cyrus Najmabadi 13f319b6ec Add a lot of clarifying comments in the parser.
Simplify parser and avoid the need to pass around 'inNewExpression' information.

Make error span smaller for "new Foo[]" errors.
2014-11-29 14:51:25 -08:00

14 lines
No EOL
669 B
Text

tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,21): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Property 'ClassA' does not exist on type 'typeof M'.
==== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts (2 errors) ====
module M
{
class ClassA {}
}
var t = new M.ClassA[];
~~
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
~~~~~~
!!! error TS2339: Property 'ClassA' does not exist on type 'typeof M'.