Merge branch 'release-1.4'

This commit is contained in:
Jason Freeman 2014-12-11 17:29:03 -08:00
commit 7f097140c9
78 changed files with 228 additions and 380 deletions

View file

@ -435,6 +435,7 @@ module ts {
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." },
You_cannot_rename_this_element: { code: 8000, category: DiagnosticCategory.Error, key: "You cannot rename this element." },
yield_expressions_are_not_currently_supported: { code: 9000, category: DiagnosticCategory.Error, key: "'yield' expressions are not currently supported." },
generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "'generators' are not currently supported." },
Generators_are_not_currently_supported: { code: 9001, category: DiagnosticCategory.Error, key: "Generators are not currently supported." },
Computed_property_names_are_not_currently_supported: { code: 9002, category: DiagnosticCategory.Error, key: "Computed property names are not currently supported." },
};
}

View file

@ -1740,8 +1740,12 @@
"category": "Error",
"code": 9000
},
"'generators' are not currently supported.": {
"Generators are not currently supported.": {
"category": "Error",
"code": 9001
},
"Computed property names are not currently supported.": {
"category": "Error",
"code": 9002
}
}

View file

@ -4491,7 +4491,7 @@ module ts {
function checkForGenerator(node: FunctionLikeDeclaration) {
if (node.asteriskToken) {
return grammarErrorOnNode(node.asteriskToken, Diagnostics.generators_are_not_currently_supported);
return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_currently_supported);
}
}
@ -4984,6 +4984,10 @@ module ts {
}
function checkComputedPropertyName(node: ComputedPropertyName) {
// Since computed properties are not supported in the type checker, disallow them in TypeScript 1.4
// Once full support is added, remove this error.
return grammarErrorOnNode(node, Diagnostics.Computed_property_names_are_not_currently_supported);
if (languageVersion < ScriptTarget.ES6) {
return grammarErrorOnNode(node, Diagnostics.Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher);
}

View file

@ -1,8 +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,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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,8 +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,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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,11 +1,11 @@
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(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.
!!! error TS9001: Generators are not currently supported.
// Legal to use 'yield' in a type context.
var v: yield;
~~~~~

View file

@ -1,8 +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,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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,11 +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,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 TS9001: Generators are not currently supported.
~~~~~
!!! error TS2304: Cannot find name 'yield'.
}

View file

@ -1,11 +1,11 @@
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(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.
!!! error TS9001: Generators are not currently supported.
// 'yield' here is an identifier, and not a yield expression.
function*foo(a = yield) {
~~~~~

View file

@ -1,7 +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,11): error TS9002: Computed property names are not currently supported.
==== 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.
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,9 +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,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.
!!! error TS9001: Generators are not currently supported.
var v = { [yield]: foo }
}

View file

@ -1,7 +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,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.
!!! error TS9001: Generators are not currently supported.

View file

@ -1,7 +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,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.
!!! error TS9001: Generators are not currently supported.

View file

@ -1,7 +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,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.
!!! error TS9001: Generators are not currently supported.

View file

@ -1,7 +1,7 @@
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,11): error TS9001: Generators are not currently supported.
==== tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts (1 errors) ====
var v = { *[foo()]() { } }
~
!!! error TS9001: 'generators' are not currently supported.
!!! error TS9001: Generators are not currently supported.

View file

@ -1,9 +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(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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,9 +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(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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,9 +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(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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,9 +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(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.
!!! error TS9001: Generators are not currently supported.
}

View file

@ -1,10 +1,10 @@
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,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.
!!! error TS9001: Generators are not currently supported.
yield(foo);
}
}

View file

@ -1,11 +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(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.
!!! error TS9001: Generators are not currently supported.
yield(foo);
}
}

View file

@ -1,7 +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,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.
!!! error TS9001: Generators are not currently supported.

View file

@ -1,10 +1,10 @@
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,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.
!!! error TS9001: Generators are not currently supported.
function bar() {
yield foo;
}

View file

@ -1,10 +1,10 @@
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,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.
!!! error TS9001: Generators are not currently supported.
function bar() {
function* quux() {
yield(foo);

View file

@ -1,10 +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,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.
!!! error TS9001: Generators are not currently supported.
yield
yield
}

View file

@ -1,10 +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,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.
!!! error TS9001: Generators are not currently supported.
yield;
yield;
}

View file

@ -1,9 +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,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.
!!! error TS9001: Generators are not currently supported.
yield*foo
}

View file

@ -1,9 +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,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.
!!! error TS9001: Generators are not currently supported.
yield foo
}

View file

@ -1,4 +1,4 @@
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(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'.
@ -8,6 +8,6 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression8_es6.ts(1,1): error
!!! error TS2304: Cannot find name 'yield'.
function* foo() {
~
!!! error TS9001: 'generators' are not currently supported.
!!! error TS9001: Generators are not currently supported.
yield(foo);
}

View file

@ -1,9 +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,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.
!!! error TS9001: Generators are not currently supported.
yield(foo);
}

View file

@ -0,0 +1,13 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts(2,9): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts(3,9): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames1.ts (2 errors) ====
var v = {
get [0 + 1]() { return 0 },
~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
set [0 + 1](v: string) { } //No error
~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,14 +0,0 @@
//// [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
};

View file

@ -1,12 +0,0 @@
=== 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
}

View file

@ -1,19 +1,37 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(4,5): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(5,12): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(6,9): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(7,9): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(8,16): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts(9,16): error TS9002: Computed property names are not currently supported.
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) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames2.ts (8 errors) ====
var methodName = "method";
var accessorName = "accessor";
class C {
[methodName]() { }
~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
static [methodName]() { }
~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
get [accessorName]() { }
~~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
~~~~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
set [accessorName](v) { }
~~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
static get [accessorName]() { }
~~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
~~~~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
static set [accessorName](v) { }
~~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,48 +0,0 @@
//// [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;
})();

View file

@ -1,18 +1,36 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(3,5): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(4,12): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(6,9): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(8,16): error TS9002: Computed property names are not currently supported.
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) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (8 errors) ====
var id;
class C {
[0 + 1]() { }
~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
static [() => { }]() { }
~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
get [delete id]() { }
~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
set [[0, 1]](v) { }
~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
static get [<String>""]() { }
~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
~~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
static set [id.toString()](v) { }
~~~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,47 +0,0 @@
//// [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;
})();

View file

@ -1,8 +1,9 @@
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(6,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (2 errors) ====
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.ts (3 errors) ====
var methodName = "method";
var accessorName = "accessor";
class C {
@ -13,4 +14,6 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.
~~~~~~~~~~~~
!!! error TS1168: Computed property names are not allowed in method overloads.
[methodName](v?: string) { }
~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts(2,4): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts (1 errors) ====
class C {
[e]() { }
~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,13 +0,0 @@
//// [parserComputedPropertyName12.ts]
class C {
[e]() { }
}
//// [parserComputedPropertyName12.js]
var C = (function () {
function C() {
}
C.prototype[e] = function () {
};
return C;
})();

View file

@ -1,7 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts ===
class C {
>C : C
[e]() { }
>e : unknown
}

View file

@ -0,0 +1,7 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts(1,15): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts (1 errors) ====
var v = { set [e](v) { } }
~~~
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,6 +0,0 @@
//// [parserComputedPropertyName17.ts]
var v = { set [e](v) { } }
//// [parserComputedPropertyName17.js]
var v = { set [e](v) {
} };

View file

@ -1,7 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts ===
var v = { set [e](v) { } }
>v : {}
>{ set [e](v) { } } : {}
>e : unknown
>v : any

View file

@ -0,0 +1,7 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts(1,11): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts (1 errors) ====
var v = { [e]: 1 };
~~~
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,5 +0,0 @@
//// [parserComputedPropertyName2.ts]
var v = { [e]: 1 };
//// [parserComputedPropertyName2.js]
var v = { [e]: 1 };

View file

@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts ===
var v = { [e]: 1 };
>v : {}
>{ [e]: 1 } : {}
>e : unknown

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts(2,9): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts (1 errors) ====
class C {
set [e](v) { }
~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,17 +0,0 @@
//// [parserComputedPropertyName24.ts]
class C {
set [e](v) { }
}
//// [parserComputedPropertyName24.js]
var C = (function () {
function C() {
}
Object.defineProperty(C.prototype, e, {
set: function (v) {
},
enumerable: true,
configurable: true
});
return C;
})();

View file

@ -1,8 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts ===
class C {
>C : C
set [e](v) { }
>e : unknown
>v : any
}

View file

@ -0,0 +1,7 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts(1,11): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts (1 errors) ====
var v = { [e]() { } };
~~~
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,6 +0,0 @@
//// [parserComputedPropertyName3.ts]
var v = { [e]() { } };
//// [parserComputedPropertyName3.js]
var v = { [e]() {
} };

View file

@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts ===
var v = { [e]() { } };
>v : {}
>{ [e]() { } } : {}
>e : unknown

View file

@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts(2,6): error TS1171: A comma expression is not allowed in a computed property name.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts(2,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName35.ts (1 errors) ====
var x = {
[0, 1]: { }
~~~~
!!! error TS1171: A comma expression is not allowed in a computed property name.
~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts(2,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts (1 errors) ====
var v = {
[public]: 0
~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
};

View file

@ -1,9 +0,0 @@
//// [parserComputedPropertyName37.ts]
var v = {
[public]: 0
};
//// [parserComputedPropertyName37.js]
var v = {
[public]: 0
};

View file

@ -1,9 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts ===
var v = {
>v : {}
>{ [public]: 0} : {}
[public]: 0
>public : unknown
};

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts(2,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts (1 errors) ====
class C {
[public]() { }
~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,13 +0,0 @@
//// [parserComputedPropertyName38.ts]
class C {
[public]() { }
}
//// [parserComputedPropertyName38.js]
var C = (function () {
function C() {
}
C.prototype[public] = function () {
};
return C;
})();

View file

@ -1,7 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts ===
class C {
>C : C
[public]() { }
>public : unknown
}

View file

@ -0,0 +1,7 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts(1,15): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts (1 errors) ====
var v = { get [e]() { } };
~~~
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,6 +0,0 @@
//// [parserComputedPropertyName4.ts]
var v = { get [e]() { } };
//// [parserComputedPropertyName4.js]
var v = { get [e]() {
} };

View file

@ -1,6 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts ===
var v = { get [e]() { } };
>v : {}
>{ get [e]() { } } : {}
>e : unknown

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts(2,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts (1 errors) ====
class C {
[a ? "" : ""]() {}
~~~~~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,13 +0,0 @@
//// [parserComputedPropertyName40.ts]
class C {
[a ? "" : ""]() {}
}
//// [parserComputedPropertyName40.js]
var C = (function () {
function C() {
}
C.prototype[a ? "" : ""] = function () {
};
return C;
})();

View file

@ -1,8 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName40.ts ===
class C {
>C : C
[a ? "" : ""]() {}
>a ? "" : "" : string
>a : unknown
}

View file

@ -0,0 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts(2,5): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts (1 errors) ====
var v = {
[0 in []]: true
~~~~~~~~~
!!! error TS9002: Computed property names are not currently supported.
}

View file

@ -1,9 +0,0 @@
//// [parserComputedPropertyName41.ts]
var v = {
[0 in []]: true
}
//// [parserComputedPropertyName41.js]
var v = {
[0 in []]: true
};

View file

@ -1,9 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts ===
var v = {
>v : {}
>{ [0 in []]: true} : {}
[0 in []]: true
>0 in [] : boolean
>[] : undefined[]
}

View file

@ -0,0 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts(1,11): error TS9002: Computed property names are not currently supported.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts(1,19): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts (2 errors) ====
var v = { [e]: 1, [e + e]: 2 };
~~~
!!! error TS9002: Computed property names are not currently supported.
~~~~~~~
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,5 +0,0 @@
//// [parserComputedPropertyName6.ts]
var v = { [e]: 1, [e + e]: 2 };
//// [parserComputedPropertyName6.js]
var v = { [e]: 1, [e + e]: 2 };

View file

@ -1,9 +0,0 @@
=== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts ===
var v = { [e]: 1, [e + e]: 2 };
>v : {}
>{ [e]: 1, [e + e]: 2 } : {}
>e : unknown
>e + e : any
>e : unknown
>e : unknown

View file

@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts(1,11): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts (1 errors) ====
var v = { [e]: 1 };
~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts(1,11): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts (1 errors) ====
var v = { [e]() { } };
~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts(1,15): error TS9002: Computed property names are not currently supported.
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts (1 errors) ====
var v = { get [e]() { } };
~~~
!!! error TS1167: Computed property names are only available when targeting ECMAScript 6 and higher.
!!! error TS9002: Computed property names are not currently supported.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: 'generators' are not currently supported.
tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts(1,9): error TS9001: Generators are not currently supported.
==== tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts (1 errors) ====
function* gen() {
~
!!! error TS9001: 'generators' are not currently supported.
!!! error TS9001: Generators are not currently supported.
// Once this is supported, the inner expression does not need to be parenthesized.
var x = yield `abc${ x }def`;
}

View file

@ -1,10 +1,10 @@
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: 'generators' are not currently supported.
tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts(1,9): error TS9001: Generators are not currently supported.
==== tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts (1 errors) ====
function* gen() {
~
!!! error TS9001: 'generators' are not currently supported.
!!! error TS9001: Generators are not currently supported.
// Once this is supported, yield *must* be parenthesized.
var x = `abc${ yield 10 }def`;
}

View file

@ -1,9 +1,9 @@
tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: 'generators' are not currently supported.
tests/cases/compiler/yieldExpression1.ts(1,9): error TS9001: Generators are not currently supported.
==== tests/cases/compiler/yieldExpression1.ts (1 errors) ====
function* foo() {
~
!!! error TS9001: 'generators' are not currently supported.
!!! error TS9001: Generators are not currently supported.
yield
}