From afc04c8db88dc2692067aecebee3bbb04aa7d054 Mon Sep 17 00:00:00 2001 From: Yui T Date: Fri, 12 Dec 2014 13:16:19 -0800 Subject: [PATCH] Move type checking: elementAccessExpression; there are still errors from not moving other grammar checking into type checker --- src/compiler/checker.ts | 15 ++++++++++++ src/compiler/parser.ts | 2 +- .../reference/badArrayIndex.errors.txt | 8 +++---- ...annotInvokeNewOnErrorExpression.errors.txt | 8 +++---- .../reference/createArray.errors.txt | 18 +++++++------- .../baselines/reference/libMembers.errors.txt | 2 +- ...rserObjectCreationArrayLiteral1.errors.txt | 8 +++---- ...rserObjectCreationArrayLiteral3.errors.txt | 8 +++---- .../reference/parserRealSource10.errors.txt | 24 +++++++++---------- .../reference/parserRealSource11.errors.txt | 6 ++--- .../reference/parserRealSource7.errors.txt | 6 ++--- .../reference/parserRealSource9.errors.txt | 6 ++--- 12 files changed, 63 insertions(+), 48 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a451fcfb80a..490b1ae9182 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -5555,6 +5555,21 @@ module ts { } function checkIndexedAccess(node: ElementAccessExpression): Type { + // Grammar checking + if (!node.argumentExpression) { + var sourceFile = getSourceFile(node); + if (node.parent.kind === SyntaxKind.NewExpression && (node.parent).expression === node) { + var start = skipTrivia(sourceFile.text, node.expression.end); + var end = node.end; + grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); + } + else { + var start = node.end - "]".length; + var end = node.end; + grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Expression_expected); + } + } + // Obtain base constraint such that we can bail out if the constraint is an unknown type var objectType = getApparentType(checkExpression(node.expression)); var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6e393fcc8fc..a26d928bf1c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -4641,7 +4641,7 @@ module ts { //case SyntaxKind.ComputedPropertyName: return checkComputedPropertyName(node); case SyntaxKind.Constructor: return checkConstructor(node); //case SyntaxKind.DeleteExpression: return checkDeleteExpression( node); - case SyntaxKind.ElementAccessExpression: return checkElementAccessExpression(node); + //case SyntaxKind.ElementAccessExpression: return checkElementAccessExpression(node); case SyntaxKind.ExportAssignment: return checkExportAssignment(node); case SyntaxKind.ExternalModuleReference: return checkExternalModuleReference(node); case SyntaxKind.ForInStatement: return checkForInStatement(node); diff --git a/tests/baselines/reference/badArrayIndex.errors.txt b/tests/baselines/reference/badArrayIndex.errors.txt index 818870f6c26..4830ff1f693 100644 --- a/tests/baselines/reference/badArrayIndex.errors.txt +++ b/tests/baselines/reference/badArrayIndex.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badArrayIndex.ts(1,22): error TS1109: Expression expected. tests/cases/compiler/badArrayIndex.ts(1,15): error TS2304: Cannot find name 'number'. +tests/cases/compiler/badArrayIndex.ts(1,22): error TS1109: Expression expected. ==== tests/cases/compiler/badArrayIndex.ts (2 errors) ==== var results = number[]; - ~ -!!! error TS1109: Expression expected. ~~~~~~ -!!! error TS2304: Cannot find name 'number'. \ No newline at end of file +!!! error TS2304: Cannot find name 'number'. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt index cfb9287cdbc..fab981a8571 100644 --- a/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnErrorExpression.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,21): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Property 'ClassA' does not exist on type 'typeof M'. +tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,21): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts (2 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/cannotInvokeNewOnErrorExpression.ts(5,15): error TS2339: Pr class ClassA {} } var t = new M.ClassA[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ -!!! error TS2339: Property 'ClassA' does not exist on type 'typeof M'. \ No newline at end of file +!!! error TS2339: Property 'ClassA' does not exist on type 'typeof M'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/createArray.errors.txt b/tests/baselines/reference/createArray.errors.txt index 6f79c4b47d2..31f6b880030 100644 --- a/tests/baselines/reference/createArray.errors.txt +++ b/tests/baselines/reference/createArray.errors.txt @@ -1,18 +1,18 @@ +tests/cases/compiler/createArray.ts(1,12): error TS2304: Cannot find name 'number'. tests/cases/compiler/createArray.ts(1,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/createArray.ts(6,6): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/createArray.ts(7,19): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/createArray.ts(1,12): error TS2304: Cannot find name 'number'. tests/cases/compiler/createArray.ts(7,12): error TS2304: Cannot find name 'boolean'. +tests/cases/compiler/createArray.ts(7,19): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/createArray.ts(8,12): error TS2304: Cannot find name 'string'. +tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/compiler/createArray.ts (7 errors) ==== var na=new number[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ !!! error TS2304: Cannot find name 'number'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. class C { } @@ -21,15 +21,15 @@ tests/cases/compiler/createArray.ts(8,12): error TS2304: Cannot find name 'strin ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var ba=new boolean[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~~ !!! error TS2304: Cannot find name 'boolean'. - var sa=new string[]; - ~~ + ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. + var sa=new string[]; ~~~~~~ !!! error TS2304: Cannot find name 'string'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. function f(s:string):number { return 0; } if (ba[14]) { diff --git a/tests/baselines/reference/libMembers.errors.txt b/tests/baselines/reference/libMembers.errors.txt index a6af67821b3..4b025b9a95b 100644 --- a/tests/baselines/reference/libMembers.errors.txt +++ b/tests/baselines/reference/libMembers.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/libMembers.ts(9,16): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/libMembers.ts(4,3): error TS2339: Property 'subby' does not exist on type 'string'. +tests/cases/compiler/libMembers.ts(9,16): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/libMembers.ts(12,15): error TS2339: Property 'prototype' does not exist on type 'C'. diff --git a/tests/baselines/reference/parserObjectCreationArrayLiteral1.errors.txt b/tests/baselines/reference/parserObjectCreationArrayLiteral1.errors.txt index 04be3a6d041..051d2357635 100644 --- a/tests/baselines/reference/parserObjectCreationArrayLiteral1.errors.txt +++ b/tests/baselines/reference/parserObjectCreationArrayLiteral1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral1.ts(1,8): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral1.ts(1,5): error TS2304: Cannot find name 'Foo'. +tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral1.ts(1,8): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral1.ts (2 errors) ==== new Foo[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~ -!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Foo'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/parserObjectCreationArrayLiteral3.errors.txt b/tests/baselines/reference/parserObjectCreationArrayLiteral3.errors.txt index 89f861cfcdb..b7d18f471da 100644 --- a/tests/baselines/reference/parserObjectCreationArrayLiteral3.errors.txt +++ b/tests/baselines/reference/parserObjectCreationArrayLiteral3.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral3.ts(1,8): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral3.ts(1,5): error TS2304: Cannot find name 'Foo'. +tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral3.ts(1,8): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/conformance/parser/ecmascript5/parserObjectCreationArrayLiteral3.ts (2 errors) ==== new Foo[](); - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~ -!!! error TS2304: Cannot find name 'Foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'Foo'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. \ No newline at end of file diff --git a/tests/baselines/reference/parserRealSource10.errors.txt b/tests/baselines/reference/parserRealSource10.errors.txt index aabafd751e7..b3c40202c4f 100644 --- a/tests/baselines/reference/parserRealSource10.errors.txt +++ b/tests/baselines/reference/parserRealSource10.errors.txt @@ -1,12 +1,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(127,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,36): error TS2304: Cannot find name 'string'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,41): error TS2304: Cannot find name 'number'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,35): error TS2304: Cannot find name 'boolean'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. @@ -340,6 +339,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(312,128): error tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts (342 errors) ==== @@ -475,20 +475,20 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(356,53): error ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. export var nodeTypeTable = new string[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~ !!! error TS2304: Cannot find name 'string'. - export var nodeTypeToTokTable = new number[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. - ~~~~~~ -!!! error TS2304: Cannot find name 'number'. - export var noRegexTable = new boolean[]; ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. + export var nodeTypeToTokTable = new number[]; + ~~~~~~ +!!! error TS2304: Cannot find name 'number'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. + export var noRegexTable = new boolean[]; ~~~~~~~ !!! error TS2304: Cannot find name 'boolean'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. noRegexTable[TokenID.Identifier] = true; noRegexTable[TokenID.StringLiteral] = true; diff --git a/tests/baselines/reference/parserRealSource11.errors.txt b/tests/baselines/reference/parserRealSource11.errors.txt index 966da980097..dc314c8d3e2 100644 --- a/tests/baselines/reference/parserRealSource11.errors.txt +++ b/tests/baselines/reference/parserRealSource11.errors.txt @@ -1,8 +1,5 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(193,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(867,29): error TS1015: Parameter cannot have question mark and initializer. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1009,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1024,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(13,22): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(14,24): error TS2304: Cannot find name 'ASTFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(17,38): error TS2304: Cannot find name 'CompilerDiagnostics'. @@ -44,6 +41,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(151,57): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(155,26): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(184,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(192,32): error TS2304: Cannot find name 'SymbolScope'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(193,40): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(196,19): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(199,42): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(219,33): error TS2304: Cannot find name 'NodeType'. @@ -252,7 +250,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,44): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1004,67): error TS2304: Cannot find name 'FncFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1005,57): error TS2304: Cannot find name 'FncFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1007,47): error TS2304: Cannot find name 'Symbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1009,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1022,32): error TS2304: Cannot find name 'Symbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1024,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1032,36): error TS2304: Cannot find name 'ControlFlowContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1033,29): error TS2304: Cannot find name 'BasicBlock'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(1034,28): error TS2304: Cannot find name 'BasicBlock'. diff --git a/tests/baselines/reference/parserRealSource7.errors.txt b/tests/baselines/reference/parserRealSource7.errors.txt index 7fddac2c467..7945e5d7034 100644 --- a/tests/baselines/reference/parserRealSource7.errors.txt +++ b/tests/baselines/reference/parserRealSource7.errors.txt @@ -1,8 +1,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(12,38): error TS2304: Cannot find name 'ASTList'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(12,62): error TS2304: Cannot find name 'TypeLink'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,37): error TS2304: Cannot find name 'TypeLink'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(21,36): error TS2304: Cannot find name 'TypeLink'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,29): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,45): error TS2304: Cannot find name 'TypeDeclaration'. @@ -326,10 +326,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T var len = bases.members.length; if (baseTypeLinks == null) { baseTypeLinks = new TypeLink[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~~~~~ !!! error TS2304: Cannot find name 'TypeLink'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. } for (var i = 0; i < len; i++) { var baseExpr = bases.members[i]; diff --git a/tests/baselines/reference/parserRealSource9.errors.txt b/tests/baselines/reference/parserRealSource9.errors.txt index 1880a72f189..9d89848ff20 100644 --- a/tests/baselines/reference/parserRealSource9.errors.txt +++ b/tests/baselines/reference/parserRealSource9.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. -tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(12,39): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(8,38): error TS2304: Cannot find name 'TypeChecker'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(9,48): error TS2304: Cannot find name 'TypeLink'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(9,67): error TS2304: Cannot find name 'SymbolScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(10,30): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(12,35): error TS2304: Cannot find name 'Type'. +tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(12,39): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(29,36): error TS2304: Cannot find name 'SymbolScope'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(29,55): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(67,54): error TS2304: Cannot find name 'SignatureGroup'. @@ -56,10 +56,10 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource9.ts(200,48): error T !!! error TS2304: Cannot find name 'Type'. if (typeLinks) { extendsList = new Type[]; - ~~ -!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ~~~~ !!! error TS2304: Cannot find name 'Type'. + ~~ +!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. for (var i = 0, len = typeLinks.length; i < len; i++) { var typeLink = typeLinks[i]; this.checker.resolvingBases = true;