mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Fix diagnostic codes.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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.
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user