Fix diagnostic codes.

This commit is contained in:
Cyrus Najmabadi
2015-03-17 22:56:45 -07:00
parent 3a75350c42
commit 7bcd18fe28
6 changed files with 27 additions and 27 deletions

View File

@@ -1,11 +1,11 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(1,15): error TS2461: Type 'StringIterator' is not an array type or a string type.
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(1,15): error TS2495: Type 'StringIterator' is not an array type or a string type.
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(11,6): error TS2304: Cannot find name 'Symbol'.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts (2 errors) ====
for (var v of new StringIterator) { }
~~~~~~~~~~~~~~~~~~
!!! error TS2461: Type 'StringIterator' is not an array type or a string type.
!!! error TS2495: Type 'StringIterator' is not an array type or a string type.
// In ES3/5, you cannot for...of over an arbitrary iterable.
class StringIterator {

View File

@@ -1,7 +1,7 @@
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts(1,17): error TS2461: Type 'number' is not an array type or a string type.
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts(1,17): error TS2495: Type 'number' is not an array type or a string type.
==== tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck12.ts (1 errors) ====
for (const v of 0) { }
~
!!! error TS2461: Type 'number' is not an array type or a string type.
!!! error TS2495: Type 'number' is not an array type or a string type.

View File

@@ -1,21 +1,21 @@
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(2,15): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(7,19): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(13,13): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(19,15): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(7,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(13,13): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts(19,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts (4 errors) ====
var a = () => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
var b = function () {
var a = () => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
}
@@ -23,7 +23,7 @@ tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts
() => {
var arg = arguments[0];
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
}
@@ -31,7 +31,7 @@ tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments.ts
foo(() => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
});
function bar() {

View File

@@ -1,21 +1,21 @@
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(2,15): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(7,19): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(13,13): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(19,15): error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(2,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(7,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(13,13): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts(19,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6.ts (4 errors) ====
var a = () => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
var b = function () {
var a = () => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
}
@@ -23,7 +23,7 @@ tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6
() => {
var arg = arguments[0];
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
}
}
@@ -31,7 +31,7 @@ tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArgumentsES6
foo(() => {
var arg = arguments[0]; // error
~~~~~~~~~
!!! error TS9002: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
});
function bar() {