mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge branch 'master' into binaryIntegerLiteral
Conflicts: src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/compiler/emitter.ts tests/baselines/reference/objectTypesWithOptionalProperties.errors.txt
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration10_es6.ts (1 errors) ====
|
||||
function * foo(a = yield => yield) {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration11_es6.ts (1 errors) ====
|
||||
function * yield() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts(1,20): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts(1,25): error TS1005: '=' expected.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts(1,28): error TS1005: '=>' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration12_es6.ts (3 errors) ====
|
||||
var v = function * yield() { }
|
||||
~~~~~
|
||||
!!! error TS1005: '(' expected.
|
||||
~
|
||||
!!! error TS1005: '=' expected.
|
||||
~
|
||||
!!! error TS1005: '=>' expected.
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts(3,11): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration13_es6.ts (2 errors) ====
|
||||
function * foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
// Legal to use 'yield' in a type context.
|
||||
var v: yield;
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration1_es6.ts (1 errors) ====
|
||||
function * foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
7
tests/baselines/reference/FunctionDeclaration2_es6.js
Normal file
7
tests/baselines/reference/FunctionDeclaration2_es6.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//// [FunctionDeclaration2_es6.ts]
|
||||
function f(yield) {
|
||||
}
|
||||
|
||||
//// [FunctionDeclaration2_es6.js]
|
||||
function f(yield) {
|
||||
}
|
||||
5
tests/baselines/reference/FunctionDeclaration2_es6.types
Normal file
5
tests/baselines/reference/FunctionDeclaration2_es6.types
Normal file
@@ -0,0 +1,5 @@
|
||||
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration2_es6.ts ===
|
||||
function f(yield) {
|
||||
>f : (yield: any) => void
|
||||
>yield : any
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts(1,20): error TS2372: Parameter 'yield' cannot be referenced in its initializer.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration3_es6.ts (1 errors) ====
|
||||
function f(yield = yield) {
|
||||
~~~~~
|
||||
!!! error TS2372: Parameter 'yield' cannot be referenced in its initializer.
|
||||
}
|
||||
8
tests/baselines/reference/FunctionDeclaration3_es6.js
Normal file
8
tests/baselines/reference/FunctionDeclaration3_es6.js
Normal file
@@ -0,0 +1,8 @@
|
||||
//// [FunctionDeclaration3_es6.ts]
|
||||
function f(yield = yield) {
|
||||
}
|
||||
|
||||
//// [FunctionDeclaration3_es6.js]
|
||||
function f(yield) {
|
||||
if (yield === void 0) { yield = yield; }
|
||||
}
|
||||
7
tests/baselines/reference/FunctionDeclaration4_es6.js
Normal file
7
tests/baselines/reference/FunctionDeclaration4_es6.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//// [FunctionDeclaration4_es6.ts]
|
||||
function yield() {
|
||||
}
|
||||
|
||||
//// [FunctionDeclaration4_es6.js]
|
||||
function yield() {
|
||||
}
|
||||
4
tests/baselines/reference/FunctionDeclaration4_es6.types
Normal file
4
tests/baselines/reference/FunctionDeclaration4_es6.types
Normal file
@@ -0,0 +1,4 @@
|
||||
=== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration4_es6.ts ===
|
||||
function yield() {
|
||||
>yield : () => void
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts(1,14): error TS1138: Parameter declaration expected.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts(1,19): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts(1,14): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration5_es6.ts (4 errors) ====
|
||||
function*foo(yield) {
|
||||
~~~~~
|
||||
!!! error TS1138: Parameter declaration expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts(1,18): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration6_es6.ts (2 errors) ====
|
||||
function*foo(a = yield) {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts(3,20): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration7_es6.ts (2 errors) ====
|
||||
function*bar() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
// 'yield' here is an identifier, and not a yield expression.
|
||||
function*foo(a = yield) {
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts (1 errors) ====
|
||||
var v = { [yield]: foo }
|
||||
~~~~~~~
|
||||
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts(1,10): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration9_es6.ts (1 errors) ====
|
||||
function * foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
var v = { [yield]: foo }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts(1,18): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression1_es6.ts (1 errors) ====
|
||||
var v = function * () { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts(1,18): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionExpressions/FunctionExpression2_es6.ts (1 errors) ====
|
||||
var v = function * foo() { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts(1,11): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments1_es6.ts (1 errors) ====
|
||||
var v = { *foo() { } }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts(1,12): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments2_es6.ts (1 errors) ====
|
||||
var v = { *() { } }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts (1 errors) ====
|
||||
var v = { *{ } }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts(1,13): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments4_es6.ts (1 errors) ====
|
||||
var v = { * }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,11): error TS9001: 'generators' are not currently supported.
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts(1,12): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (2 errors) ====
|
||||
var v = { *[foo()]() { } }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
~~~~~~~
|
||||
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts(1,12): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments6_es6.ts (1 errors) ====
|
||||
var v = { *<T>() { } }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts(2,4): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration1_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*foo() { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts(2,11): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration2_es6.ts (1 errors) ====
|
||||
class C {
|
||||
public * foo() { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts(2,4): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*[foo]() { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts(2,5): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration4_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*() { }
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*
|
||||
}
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts (2 errors) ====
|
||||
class C {
|
||||
*foo
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
}
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts(2,4): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration7_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*foo<T>() { }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,12): error TS1127: Invalid character.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,14): error TS1129: Statement expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,19): error TS1005: '(' expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(5,5): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(6,3): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(7,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,9): error TS2304: Cannot find name 'a'.
|
||||
tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts(4,16): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration8_es6.ts (8 errors) ====
|
||||
class C {
|
||||
foo() {
|
||||
// Make sure we don't think of *bar as the start of a generator method.
|
||||
if (a) # * bar;
|
||||
|
||||
!!! error TS1127: Invalid character.
|
||||
~
|
||||
!!! error TS1129: Statement expected.
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'a'.
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
return bar;
|
||||
~~~~~~
|
||||
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
}
|
||||
~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
10
tests/baselines/reference/TemplateExpression1.errors.txt
Normal file
10
tests/baselines/reference/TemplateExpression1.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,19): error TS1158: Invalid template literal; expected '}'
|
||||
tests/cases/conformance/es6/templates/TemplateExpression1.ts(1,17): error TS2304: Cannot find name 'a'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/templates/TemplateExpression1.ts (2 errors) ====
|
||||
var v = `foo ${ a
|
||||
|
||||
!!! error TS1158: Invalid template literal; expected '}'
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'a'.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration10_es6.ts (1 errors) ====
|
||||
let a: number = 1
|
||||
~
|
||||
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,4): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts (1 errors) ====
|
||||
"use strict";
|
||||
let
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts(1,6): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration1_es6.ts (1 errors) ====
|
||||
const
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ====
|
||||
const a
|
||||
~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration3_es6.ts (1 errors) ====
|
||||
const a = 1
|
||||
~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ====
|
||||
const a: number
|
||||
~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts(1,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration5_es6.ts (1 errors) ====
|
||||
const a: number = 1
|
||||
~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts(1,4): error TS1123: Variable declaration list cannot be empty.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration6_es6.ts (1 errors) ====
|
||||
let
|
||||
|
||||
!!! error TS1123: Variable declaration list cannot be empty.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration7_es6.ts (1 errors) ====
|
||||
let a
|
||||
~
|
||||
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration8_es6.ts (1 errors) ====
|
||||
let a = 1
|
||||
~
|
||||
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts(1,5): error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration9_es6.ts (1 errors) ====
|
||||
let a: number
|
||||
~
|
||||
!!! error TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
11
tests/baselines/reference/YieldExpression10_es6.errors.txt
Normal file
11
tests/baselines/reference/YieldExpression10_es6.errors.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts(1,11): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression10_es6.ts (1 errors) ====
|
||||
var v = { * foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield(foo);
|
||||
}
|
||||
}
|
||||
|
||||
11
tests/baselines/reference/YieldExpression11_es6.errors.txt
Normal file
11
tests/baselines/reference/YieldExpression11_es6.errors.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts(2,3): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression11_es6.ts (1 errors) ====
|
||||
class C {
|
||||
*foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield(foo);
|
||||
}
|
||||
}
|
||||
11
tests/baselines/reference/YieldExpression12_es6.errors.txt
Normal file
11
tests/baselines/reference/YieldExpression12_es6.errors.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression12_es6.ts (1 errors) ====
|
||||
class C {
|
||||
constructor() {
|
||||
yield foo
|
||||
~~~~~
|
||||
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression13_es6.ts (1 errors) ====
|
||||
function* foo() { yield }
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
11
tests/baselines/reference/YieldExpression14_es6.errors.txt
Normal file
11
tests/baselines/reference/YieldExpression14_es6.errors.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts(3,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression14_es6.ts (1 errors) ====
|
||||
class C {
|
||||
foo() {
|
||||
yield foo
|
||||
~~~~~
|
||||
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts(2,6): error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression15_es6.ts (1 errors) ====
|
||||
var v = () => {
|
||||
yield foo
|
||||
~~~~~
|
||||
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
}
|
||||
11
tests/baselines/reference/YieldExpression16_es6.errors.txt
Normal file
11
tests/baselines/reference/YieldExpression16_es6.errors.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression16_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
function bar() {
|
||||
yield foo;
|
||||
}
|
||||
}
|
||||
10
tests/baselines/reference/YieldExpression17_es6.errors.txt
Normal file
10
tests/baselines/reference/YieldExpression17_es6.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts(1,15): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression17_es6.ts (2 errors) ====
|
||||
var v = { get foo() { yield foo; } }
|
||||
~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
~~~
|
||||
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts (1 errors) ====
|
||||
"use strict";
|
||||
yield(foo);
|
||||
~~~~~
|
||||
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
13
tests/baselines/reference/YieldExpression19_es6.errors.txt
Normal file
13
tests/baselines/reference/YieldExpression19_es6.errors.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression19_es6.ts (1 errors) ====
|
||||
function*foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
function bar() {
|
||||
function* quux() {
|
||||
yield(foo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts(1,1): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression1_es6.ts (1 errors) ====
|
||||
yield;
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
5
tests/baselines/reference/YieldExpression1_es6.js
Normal file
5
tests/baselines/reference/YieldExpression1_es6.js
Normal file
@@ -0,0 +1,5 @@
|
||||
//// [YieldExpression1_es6.ts]
|
||||
yield;
|
||||
|
||||
//// [YieldExpression1_es6.js]
|
||||
yield;
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts(1,1): error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression2_es6.ts (1 errors) ====
|
||||
yield foo;
|
||||
~~~~~
|
||||
!!! error TS1163: 'yield' expression must be contained_within a generator declaration.
|
||||
10
tests/baselines/reference/YieldExpression3_es6.errors.txt
Normal file
10
tests/baselines/reference/YieldExpression3_es6.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression3_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield
|
||||
yield
|
||||
}
|
||||
10
tests/baselines/reference/YieldExpression4_es6.errors.txt
Normal file
10
tests/baselines/reference/YieldExpression4_es6.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression4_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield;
|
||||
yield;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts(3,1): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression5_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
yield*
|
||||
}
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression6_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield*foo
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts(1,9): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression7_es6.ts (1 errors) ====
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield foo
|
||||
}
|
||||
13
tests/baselines/reference/YieldExpression8_es6.errors.txt
Normal file
13
tests/baselines/reference/YieldExpression8_es6.errors.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(2,9): error TS9001: 'generators' are not currently supported.
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error TS2304: Cannot find name 'yield'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts (2 errors) ====
|
||||
yield(foo);
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
function* foo() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield(foo);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts(1,17): error TS9001: 'generators' are not currently supported.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/yieldExpressions/YieldExpression9_es6.ts (1 errors) ====
|
||||
var v = function*() {
|
||||
~
|
||||
!!! error TS9001: 'generators' are not currently supported.
|
||||
yield(foo);
|
||||
}
|
||||
@@ -11,13 +11,12 @@ tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifier
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(34,12): error TS1029: 'public' modifier must precede 'static' modifier.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(35,12): error TS1029: 'public' modifier must precede 'static' modifier.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(40,13): error TS1028: Accessibility modifier already seen.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(40,20): error TS1028: Accessibility modifier already seen.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(41,12): error TS1028: Accessibility modifier already seen.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(42,13): error TS1028: Accessibility modifier already seen.
|
||||
tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts(43,12): error TS1028: Accessibility modifier already seen.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts (17 errors) ====
|
||||
==== tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifiers.ts (16 errors) ====
|
||||
|
||||
// No errors
|
||||
class C {
|
||||
@@ -83,8 +82,6 @@ tests/cases/conformance/classes/propertyMemberDeclarations/accessibilityModifier
|
||||
class E {
|
||||
private public protected property;
|
||||
~~~~~~
|
||||
!!! error TS1028: Accessibility modifier already seen.
|
||||
~~~~~~~~~
|
||||
!!! error TS1028: Accessibility modifier already seen.
|
||||
public protected method() { }
|
||||
~~~~~~~~~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/aliasInaccessibleModule.ts(4,5): error TS4000: Import declaration 'X' is using private name 'N'.
|
||||
tests/cases/compiler/aliasInaccessibleModule.ts(4,23): error TS4000: Import declaration 'X' is using private name 'N'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/aliasInaccessibleModule.ts (1 errors) ====
|
||||
@@ -6,6 +6,6 @@ tests/cases/compiler/aliasInaccessibleModule.ts(4,5): error TS4000: Import decla
|
||||
module N {
|
||||
}
|
||||
export import X = N;
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS4000: Import declaration 'X' is using private name 'N'.
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/aliasInaccessibleModule2.ts(7,5): error TS4000: Import declaration 'R' is using private name 'N'.
|
||||
tests/cases/compiler/aliasInaccessibleModule2.ts(7,16): error TS4000: Import declaration 'R' is using private name 'N'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/aliasInaccessibleModule2.ts (1 errors) ====
|
||||
@@ -9,7 +9,7 @@ tests/cases/compiler/aliasInaccessibleModule2.ts(7,5): error TS4000: Import decl
|
||||
|
||||
}
|
||||
import R = N;
|
||||
~~~~~~~~~~~~~
|
||||
~
|
||||
!!! error TS4000: Import declaration 'R' is using private name 'N'.
|
||||
export import X = R;
|
||||
}
|
||||
17
tests/baselines/reference/ambientEnum1.errors.txt
Normal file
17
tests/baselines/reference/ambientEnum1.errors.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
tests/cases/compiler/ambientEnum1.ts(2,9): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
tests/cases/compiler/ambientEnum1.ts(7,9): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientEnum1.ts (2 errors) ====
|
||||
declare enum E1 {
|
||||
y = 4.23
|
||||
~
|
||||
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
}
|
||||
|
||||
// Ambient enum with computer member
|
||||
declare enum E2 {
|
||||
x = 'foo'.length
|
||||
~
|
||||
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
}
|
||||
@@ -4,8 +4,8 @@ tests/cases/conformance/ambient/ambientErrors.ts(24,5): error TS1066: Ambient en
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(29,5): error TS1066: Ambient enum elements can only have integer literal initializers.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(34,11): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(35,19): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(37,18): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(38,11): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(39,23): error TS1111: A constructor implementation cannot be declared in an ambient context.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(40,14): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
tests/cases/conformance/ambient/ambientErrors.ts(41,22): error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
@@ -70,10 +70,10 @@ tests/cases/conformance/ambient/ambientErrors.ts(57,5): error TS2309: An export
|
||||
!!! error TS1037: A function implementation cannot be declared in an ambient context.
|
||||
class C {
|
||||
static x = 3;
|
||||
~
|
||||
~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
y = 4;
|
||||
~
|
||||
~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
constructor() { }
|
||||
~
|
||||
|
||||
7
tests/baselines/reference/ambientErrors1.errors.txt
Normal file
7
tests/baselines/reference/ambientErrors1.errors.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
tests/cases/compiler/ambientErrors1.ts(1,15): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientErrors1.ts (1 errors) ====
|
||||
declare var x = 4;
|
||||
~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
14
tests/baselines/reference/ambientStatement1.errors.txt
Normal file
14
tests/baselines/reference/ambientStatement1.errors.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
tests/cases/compiler/ambientStatement1.ts(2,6): error TS1036: Statements are not allowed in ambient contexts.
|
||||
tests/cases/compiler/ambientStatement1.ts(4,20): error TS1039: Initializers are not allowed in ambient contexts.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ambientStatement1.ts (2 errors) ====
|
||||
declare module M1 {
|
||||
while(true);
|
||||
~~~~~
|
||||
!!! error TS1036: Statements are not allowed in ambient contexts.
|
||||
|
||||
export var v1 = () => false;
|
||||
~
|
||||
!!! error TS1039: Initializers are not allowed in ambient contexts.
|
||||
}
|
||||
@@ -20,9 +20,6 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(3
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(31,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(32,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,30): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,13): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,21): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -40,7 +37,7 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6
|
||||
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (40 errors) ====
|
||||
==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (37 errors) ====
|
||||
// expected error for all the LHS of assignments
|
||||
var value;
|
||||
|
||||
@@ -119,20 +116,14 @@ tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7
|
||||
constructor() { super(); super = value; }
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
foo() { super = value }
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
static sfoo() { super = value; }
|
||||
~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
|
||||
// function expression
|
||||
|
||||
@@ -2,11 +2,10 @@ tests/cases/compiler/badArraySyntax.ts(6,15): error TS1150: 'new T[]' cannot be
|
||||
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,29): 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.
|
||||
|
||||
|
||||
==== tests/cases/compiler/badArraySyntax.ts (6 errors) ====
|
||||
==== tests/cases/compiler/badArraySyntax.ts (5 errors) ====
|
||||
class Z {
|
||||
public x = "";
|
||||
}
|
||||
@@ -25,8 +24,6 @@ tests/cases/compiler/badArraySyntax.ts(10,40): error TS1150: 'new T[]' cannot be
|
||||
~~
|
||||
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
||||
var a6: Z[][] = new Z [ ] [ ];
|
||||
~~~~~~~~
|
||||
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
||||
~~~~
|
||||
!!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(7,19): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,19): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(7,19): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,19): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(9,24): error TS1005: ';' expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(3,17): error TS2304: Cannot find name 'number'.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(4,18): error TS2304: Cannot find name 'string'.
|
||||
@@ -28,13 +28,13 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
!!! error TS2304: Cannot find name 'Void'.
|
||||
class C4a extends void {}
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
class C5 extends Null { }
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'Null'.
|
||||
class C5a extends null { }
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
class C6 extends undefined { }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(3,19): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,19): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(3,19): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,19): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive2.ts(4,24): error TS1005: ';' expected.
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
|
||||
class C4a extends void {}
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
class C5a extends null { }
|
||||
~~~~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,5 +1,4 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,18): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(16,20): error TS1005: ';' expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2311: A class may only extend another class.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2304: Cannot find name 'x'.
|
||||
@@ -7,7 +6,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(14,18): error TS2304: Cannot find name 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (7 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts (6 errors) ====
|
||||
interface I {
|
||||
foo: string;
|
||||
}
|
||||
@@ -16,8 +15,6 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
!!! error TS2311: A class may only extend another class.
|
||||
|
||||
class C2 extends { foo: string; } { } // error
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
var x: { foo: string; }
|
||||
class C3 extends x { } // error
|
||||
~
|
||||
@@ -35,6 +32,6 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla
|
||||
|
||||
class C6 extends []{ } // error
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,15 +1,12 @@
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS1133: Type reference expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,20): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (3 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts (2 errors) ====
|
||||
class C2 extends { foo: string; } { } // error
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
|
||||
class C6 extends []{ } // error
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
!!! error TS1133: Type reference expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
@@ -1,12 +1,9 @@
|
||||
tests/cases/compiler/classExtendsMultipleBaseClasses.ts(3,18): error TS1005: '{' expected.
|
||||
tests/cases/compiler/classExtendsMultipleBaseClasses.ts(3,21): error TS1005: ';' expected.
|
||||
tests/cases/compiler/classExtendsMultipleBaseClasses.ts(3,19): error TS1174: Classes can only extend a single class.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classExtendsMultipleBaseClasses.ts (2 errors) ====
|
||||
==== tests/cases/compiler/classExtendsMultipleBaseClasses.ts (1 errors) ====
|
||||
class A { }
|
||||
class B { }
|
||||
class C extends A,B { }
|
||||
~
|
||||
!!! error TS1005: '{' expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1174: Classes can only extend a single class.
|
||||
@@ -1,9 +1,9 @@
|
||||
tests/cases/compiler/classHeritageWithTrailingSeparator.ts(2,18): error TS1005: '{' expected.
|
||||
tests/cases/compiler/classHeritageWithTrailingSeparator.ts(2,18): error TS1009: Trailing comma not allowed.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classHeritageWithTrailingSeparator.ts (1 errors) ====
|
||||
class C { foo: number }
|
||||
class D extends C, {
|
||||
~
|
||||
!!! error TS1005: '{' expected.
|
||||
!!! error TS1009: Trailing comma not allowed.
|
||||
}
|
||||
@@ -116,7 +116,7 @@ interface i2 {
|
||||
/** this is x*/
|
||||
x: number;
|
||||
/** this is foo*/
|
||||
foo: (b: number) => string;
|
||||
foo: (/**param help*/ b: number) => string;
|
||||
/** this is indexer*/
|
||||
[/**string param*/ i: string]: any;
|
||||
/**new method*/
|
||||
@@ -152,7 +152,7 @@ interface i3 {
|
||||
/** Function i3 f*/
|
||||
f(/**number parameter*/ a: number): string;
|
||||
/** i3 l*/
|
||||
l: (b: number) => string;
|
||||
l: (/**comment i3 l b*/ b: number) => string;
|
||||
nc_x: number;
|
||||
nc_f(a: number): string;
|
||||
nc_l: (b: number) => string;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters.
|
||||
tests/cases/compiler/complicatedPrivacy.ts(24,38): error TS1005: ';' expected.
|
||||
tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS1022: An index signature parameter must have a type annotation.
|
||||
tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5' has no exported member 'i6'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/complicatedPrivacy.ts (4 errors) ====
|
||||
==== tests/cases/compiler/complicatedPrivacy.ts (2 errors) ====
|
||||
module m1 {
|
||||
export module m2 {
|
||||
|
||||
@@ -16,8 +14,6 @@ tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5'
|
||||
|
||||
export class C2 implements m3.i3 {
|
||||
public get p1(arg) {
|
||||
~~
|
||||
!!! error TS1054: A 'get' accessor cannot have parameters.
|
||||
return new C1();
|
||||
}
|
||||
|
||||
@@ -44,8 +40,6 @@ tests/cases/compiler/complicatedPrivacy.ts(73,49): error TS2305: Module 'mglo5'
|
||||
export function f4(arg1:
|
||||
{
|
||||
[number]: C1;
|
||||
~~~~~~
|
||||
!!! error TS1022: An index signature parameter must have a type annotation.
|
||||
}) {
|
||||
}
|
||||
|
||||
|
||||
@@ -42,12 +42,6 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(55,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(62,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(63,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(69,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(70,9): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(74,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(75,9): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(79,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(80,9): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(91,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(92,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(95,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
@@ -80,7 +74,7 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts(122,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (80 errors) ====
|
||||
==== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsValue.ts (74 errors) ====
|
||||
// expected error for all the LHS of compound assignments (arithmetic and addition)
|
||||
var value;
|
||||
|
||||
@@ -220,39 +214,27 @@ tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsVa
|
||||
super *= value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
super += value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
|
||||
foo() {
|
||||
super *= value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
super += value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
|
||||
static sfoo() {
|
||||
super *= value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
super += value;
|
||||
~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
14
tests/baselines/reference/computedPropertyNames1.js
Normal file
14
tests/baselines/reference/computedPropertyNames1.js
Normal file
@@ -0,0 +1,14 @@
|
||||
//// [computedPropertyNames1.ts]
|
||||
var v = {
|
||||
get [0 + 1]() { return 0 },
|
||||
set [0 + 1](v: string) { } //No error
|
||||
}
|
||||
|
||||
//// [computedPropertyNames1.js]
|
||||
var v = {
|
||||
get [0 + 1]() {
|
||||
return 0;
|
||||
},
|
||||
set [0 + 1](v) {
|
||||
} //No error
|
||||
};
|
||||
12
tests/baselines/reference/computedPropertyNames1.types
Normal file
12
tests/baselines/reference/computedPropertyNames1.types
Normal file
@@ -0,0 +1,12 @@
|
||||
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts ===
|
||||
var v = {
|
||||
>v : {}
|
||||
>{ get [0 + 1]() { return 0 }, set [0 + 1](v: string) { } //No error} : {}
|
||||
|
||||
get [0 + 1]() { return 0 },
|
||||
>0 + 1 : number
|
||||
|
||||
set [0 + 1](v: string) { } //No error
|
||||
>0 + 1 : number
|
||||
>v : string
|
||||
}
|
||||
19
tests/baselines/reference/computedPropertyNames2.errors.txt
Normal file
19
tests/baselines/reference/computedPropertyNames2.errors.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(6,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(8,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts (2 errors) ====
|
||||
var methodName = "method";
|
||||
var accessorName = "accessor";
|
||||
class C {
|
||||
[methodName]() { }
|
||||
static [methodName]() { }
|
||||
get [accessorName]() { }
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
set [accessorName](v) { }
|
||||
static get [accessorName]() { }
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
static set [accessorName](v) { }
|
||||
}
|
||||
48
tests/baselines/reference/computedPropertyNames2.js
Normal file
48
tests/baselines/reference/computedPropertyNames2.js
Normal file
@@ -0,0 +1,48 @@
|
||||
//// [computedPropertyNames2.ts]
|
||||
var methodName = "method";
|
||||
var accessorName = "accessor";
|
||||
class C {
|
||||
[methodName]() { }
|
||||
static [methodName]() { }
|
||||
get [accessorName]() { }
|
||||
set [accessorName](v) { }
|
||||
static get [accessorName]() { }
|
||||
static set [accessorName](v) { }
|
||||
}
|
||||
|
||||
//// [computedPropertyNames2.js]
|
||||
var methodName = "method";
|
||||
var accessorName = "accessor";
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[methodName] = function () {
|
||||
};
|
||||
C[methodName] = function () {
|
||||
};
|
||||
Object.defineProperty(C.prototype, accessorName, {
|
||||
get: function () {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C.prototype, accessorName, {
|
||||
set: function (v) {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C, accessorName, {
|
||||
get: function () {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C, accessorName, {
|
||||
set: function (v) {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return C;
|
||||
})();
|
||||
18
tests/baselines/reference/computedPropertyNames3.errors.txt
Normal file
18
tests/baselines/reference/computedPropertyNames3.errors.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (2 errors) ====
|
||||
var id;
|
||||
class C {
|
||||
[0 + 1]() { }
|
||||
static [() => { }]() { }
|
||||
get [delete id]() { }
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
set [[0, 1]](v) { }
|
||||
static get [<String>""]() { }
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
|
||||
static set [id.toString()](v) { }
|
||||
}
|
||||
47
tests/baselines/reference/computedPropertyNames3.js
Normal file
47
tests/baselines/reference/computedPropertyNames3.js
Normal file
@@ -0,0 +1,47 @@
|
||||
//// [computedPropertyNames3.ts]
|
||||
var id;
|
||||
class C {
|
||||
[0 + 1]() { }
|
||||
static [() => { }]() { }
|
||||
get [delete id]() { }
|
||||
set [[0, 1]](v) { }
|
||||
static get [<String>""]() { }
|
||||
static set [id.toString()](v) { }
|
||||
}
|
||||
|
||||
//// [computedPropertyNames3.js]
|
||||
var id;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype[0 + 1] = function () {
|
||||
};
|
||||
C[function () {
|
||||
}] = function () {
|
||||
};
|
||||
Object.defineProperty(C.prototype, delete id, {
|
||||
get: function () {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C.prototype, [0, 1], {
|
||||
set: function (v) {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C, "", {
|
||||
get: function () {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(C, id.toString(), {
|
||||
set: function (v) {
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return C;
|
||||
})();
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(4,5): error TS1168: Computed property names are not allowed in method overloads.
|
||||
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts(5,5): error TS1168: Computed property names are not allowed in method overloads.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (2 errors) ====
|
||||
var methodName = "method";
|
||||
var accessorName = "accessor";
|
||||
class C {
|
||||
[methodName](v: string);
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1168: Computed property names are not allowed in method overloads.
|
||||
[methodName]();
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1168: Computed property names are not allowed in method overloads.
|
||||
[methodName](v?: string) { }
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
tests/cases/compiler/constDeclarations-es5.ts(2,1): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/compiler/constDeclarations-es5.ts(3,1): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/compiler/constDeclarations-es5.ts(4,1): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/compiler/constDeclarations-es5.ts(2,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/compiler/constDeclarations-es5.ts(3,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
tests/cases/compiler/constDeclarations-es5.ts(4,7): error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constDeclarations-es5.ts (3 errors) ====
|
||||
|
||||
const z7 = false;
|
||||
~~~~~~~~~~~~~~~~~
|
||||
~~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
const z8: number = 23;
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
const z9 = 0, z10 :string = "", z11 = null;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
~~
|
||||
!!! error TS1154: 'const' declarations are only available when targeting ECMAScript 6 and higher.
|
||||
|
||||
@@ -12,6 +12,10 @@ var anotherVar;
|
||||
|
||||
|
||||
//// [constructorTypeWithTypeParameters.d.ts]
|
||||
declare var X: new <T>() => number;
|
||||
declare var Y: new () => number;
|
||||
declare var X: {
|
||||
new <T>(): number;
|
||||
};
|
||||
declare var Y: {
|
||||
new (): number;
|
||||
};
|
||||
declare var anotherVar: new <T>() => number;
|
||||
|
||||
@@ -7,14 +7,11 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(28,30): error TS
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(28,33): error TS1138: Parameter declaration expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(28,34): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(28,36): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(30,21): error TS1108: A 'return' statement can only be used within a function body.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1129: Statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(38,17): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,41): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(43,21): error TS1108: A 'return' statement can only be used within a function body.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(55,13): error TS1108: A 'return' statement can only be used within a function body.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character.
|
||||
@@ -30,18 +27,14 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(159,30): error T
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(218,36): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(219,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(227,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(234,14): error TS1005: '{' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(236,13): error TS1108: A 'return' statement can only be used within a function body.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(239,13): error TS1108: A 'return' statement can only be used within a function body.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(254,67): error TS1093: Type annotation cannot appear on a constructor declaration.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(254,69): error TS1110: Type expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,9): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected.
|
||||
@@ -49,7 +42,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,9): error TS
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,59): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1129: Statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,9): error TS1129: Statement expected.
|
||||
@@ -95,7 +87,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,29): error T
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2304: Cannot find name 'string'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (95 errors) ====
|
||||
==== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts (87 errors) ====
|
||||
declare module "fs" {
|
||||
export class File {
|
||||
constructor(filename: string);
|
||||
@@ -155,8 +147,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
return 1;
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
^
|
||||
~
|
||||
!!! error TS1129: Statement expected.
|
||||
@@ -190,8 +180,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
!!! error TS2304: Cannot find name 'retValue'.
|
||||
|
||||
return 1;
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
@@ -210,8 +198,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
|
||||
return 0;
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
|
||||
}
|
||||
}
|
||||
@@ -420,8 +406,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
~~~~~
|
||||
!!! error TS2304: Cannot find name 'yield'.
|
||||
public get Property() { return 0; }
|
||||
~~~~~~~~
|
||||
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
||||
public Member() {
|
||||
return 0;
|
||||
}
|
||||
@@ -457,8 +441,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'number'.
|
||||
return val;
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
}
|
||||
public method2() {
|
||||
~~~~~~
|
||||
@@ -468,8 +450,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'method2'.
|
||||
return 2 * this.method1(2);
|
||||
~~~~~~
|
||||
!!! error TS1108: A 'return' statement can only be used within a function body.
|
||||
}
|
||||
}
|
||||
~
|
||||
@@ -489,8 +469,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
private otherValue = 42;
|
||||
|
||||
constructor(private value: number, public name: string) : }
|
||||
|
||||
!!! error TS1093: Type annotation cannot appear on a constructor declaration.
|
||||
~
|
||||
!!! error TS1110: Type expected.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -519,8 +497,6 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error T
|
||||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//// [tests/cases/compiler/declFileAliasUseBeforeDeclaration.ts] ////
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration_foo.ts]
|
||||
|
||||
export class Foo { }
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration_test.ts]
|
||||
export function bar(a: foo.Foo) { }
|
||||
import foo = require("declFileAliasUseBeforeDeclaration_foo");
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration_foo.js]
|
||||
var Foo = (function () {
|
||||
function Foo() {
|
||||
}
|
||||
return Foo;
|
||||
})();
|
||||
exports.Foo = Foo;
|
||||
//// [declFileAliasUseBeforeDeclaration_test.js]
|
||||
function bar(a) {
|
||||
}
|
||||
exports.bar = bar;
|
||||
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration_foo.d.ts]
|
||||
export declare class Foo {
|
||||
}
|
||||
//// [declFileAliasUseBeforeDeclaration_test.d.ts]
|
||||
export declare function bar(a: foo.Foo): void;
|
||||
import foo = require("declFileAliasUseBeforeDeclaration_foo");
|
||||
@@ -0,0 +1,15 @@
|
||||
=== tests/cases/compiler/declFileAliasUseBeforeDeclaration_test.ts ===
|
||||
export function bar(a: foo.Foo) { }
|
||||
>bar : (a: foo.Foo) => void
|
||||
>a : foo.Foo
|
||||
>foo : unknown
|
||||
>Foo : foo.Foo
|
||||
|
||||
import foo = require("declFileAliasUseBeforeDeclaration_foo");
|
||||
>foo : typeof foo
|
||||
|
||||
=== tests/cases/compiler/declFileAliasUseBeforeDeclaration_foo.ts ===
|
||||
|
||||
export class Foo { }
|
||||
>Foo : Foo
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//// [declFileAliasUseBeforeDeclaration2.ts]
|
||||
|
||||
declare module "test" {
|
||||
module A {
|
||||
class C {
|
||||
}
|
||||
}
|
||||
class B extends E {
|
||||
}
|
||||
import E = A.C;
|
||||
}
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration2.js]
|
||||
|
||||
|
||||
//// [declFileAliasUseBeforeDeclaration2.d.ts]
|
||||
declare module "test" {
|
||||
module A {
|
||||
class C {
|
||||
}
|
||||
}
|
||||
class B extends E {
|
||||
}
|
||||
import E = A.C;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
=== tests/cases/compiler/declFileAliasUseBeforeDeclaration2.ts ===
|
||||
|
||||
declare module "test" {
|
||||
module A {
|
||||
>A : typeof A
|
||||
|
||||
class C {
|
||||
>C : C
|
||||
}
|
||||
}
|
||||
class B extends E {
|
||||
>B : B
|
||||
>E : E
|
||||
}
|
||||
import E = A.C;
|
||||
>E : typeof E
|
||||
>A : typeof A
|
||||
>C : E
|
||||
}
|
||||
@@ -11,7 +11,7 @@ interface I {
|
||||
|
||||
//// [declFileForInterfaceWithRestParams.d.ts]
|
||||
interface I {
|
||||
foo(...x: any[]): any[];
|
||||
foo2(a: number, ...x: any[]): any[];
|
||||
foo3(b: string, ...x: string[]): string[];
|
||||
foo(...x: any[]): typeof x;
|
||||
foo2(a: number, ...x: any[]): typeof x;
|
||||
foo3(b: string, ...x: string[]): typeof x;
|
||||
}
|
||||
|
||||
@@ -120,9 +120,9 @@ export declare module C {
|
||||
class B {
|
||||
}
|
||||
function F<T>(x: T): A<B>;
|
||||
function F2<T>(x: T): A<B>;
|
||||
function F3<T>(x: T): A<B>[];
|
||||
function F4<T extends A<B>>(x: T): A<B>[];
|
||||
function F2<T>(x: T): C.A<C.B>;
|
||||
function F3<T>(x: T): C.A<C.B>[];
|
||||
function F4<T extends A<B>>(x: T): Array<C.A<C.B>>;
|
||||
function F5<T>(): T;
|
||||
function F6<T extends A<B>>(x: T): T;
|
||||
class D<T> {
|
||||
|
||||
@@ -97,16 +97,16 @@ declare module templa.mvc {
|
||||
}
|
||||
}
|
||||
declare module templa.mvc {
|
||||
interface IController<ModelType extends IModel> {
|
||||
interface IController<ModelType extends templa.mvc.IModel> {
|
||||
}
|
||||
}
|
||||
declare module templa.mvc {
|
||||
class AbstractController<ModelType extends IModel> implements IController<ModelType> {
|
||||
class AbstractController<ModelType extends templa.mvc.IModel> implements mvc.IController<ModelType> {
|
||||
}
|
||||
}
|
||||
declare module templa.mvc.composite {
|
||||
interface ICompositeControllerModel extends IModel {
|
||||
getControllers(): IController<IModel>[];
|
||||
interface ICompositeControllerModel extends mvc.IModel {
|
||||
getControllers(): mvc.IController<mvc.IModel>[];
|
||||
}
|
||||
}
|
||||
declare module templa.dom.mvc {
|
||||
@@ -119,7 +119,7 @@ declare module templa.dom.mvc {
|
||||
}
|
||||
}
|
||||
declare module templa.dom.mvc.composite {
|
||||
class AbstractCompositeElementController<ModelType extends templa.mvc.composite.ICompositeControllerModel> extends AbstractElementController<ModelType> {
|
||||
class AbstractCompositeElementController<ModelType extends templa.mvc.composite.ICompositeControllerModel> extends templa.dom.mvc.AbstractElementController<ModelType> {
|
||||
_controllers: templa.mvc.IController<templa.mvc.IModel>[];
|
||||
constructor();
|
||||
}
|
||||
|
||||
@@ -32,8 +32,12 @@ var f6 = function () {
|
||||
|
||||
//// [declFileRestParametersOfFunctionAndFunctionType.d.ts]
|
||||
declare function f1(...args: any[]): void;
|
||||
declare function f2(x: (...args: any[]) => void): void;
|
||||
declare function f3(x: (...args: any[]) => void): void;
|
||||
declare function f4<T extends (...args: any[]) => void>(): void;
|
||||
declare function f5<T extends (...args: any[]) => void>(): void;
|
||||
declare function f2(x: (...args) => void): void;
|
||||
declare function f3(x: {
|
||||
(...args): void;
|
||||
}): void;
|
||||
declare function f4<T extends (...args) => void>(): void;
|
||||
declare function f5<T extends {
|
||||
(...args): void;
|
||||
}>(): void;
|
||||
declare var f6: () => any[];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user