mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add/rename baselines.
This commit is contained in:
+5
-5
@@ -1,10 +1,10 @@
|
||||
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/emitArrowFunctionWhenUsingArguments01.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/emitArrowFunctionWhenUsingArguments01.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/emitArrowFunctionWhenUsingArguments01.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/emitArrowFunctionWhenUsingArguments01.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) ====
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts (4 errors) ====
|
||||
var a = () => {
|
||||
var arg = arguments[0]; // error
|
||||
~~~~~~~~~
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
//// [emitArrowFunctionWhenUsingArgumentsES6.ts]
|
||||
//// [emitArrowFunctionWhenUsingArguments01.ts]
|
||||
var a = () => {
|
||||
var arg = arguments[0]; // error
|
||||
}
|
||||
@@ -31,28 +31,28 @@ function bar() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArgumentsES6.js]
|
||||
var a = () => {
|
||||
//// [emitArrowFunctionWhenUsingArguments01.js]
|
||||
var a = function () {
|
||||
var arg = arguments[0]; // error
|
||||
};
|
||||
var b = function () {
|
||||
var a = () => {
|
||||
var a = function () {
|
||||
var arg = arguments[0]; // error
|
||||
};
|
||||
};
|
||||
function baz() {
|
||||
(() => {
|
||||
(function () {
|
||||
var arg = arguments[0];
|
||||
});
|
||||
}
|
||||
function foo(inputFunc) { }
|
||||
foo(() => {
|
||||
foo(function () {
|
||||
var arg = arguments[0]; // error
|
||||
});
|
||||
function bar() {
|
||||
var arg = arguments[0]; // no error
|
||||
}
|
||||
(() => {
|
||||
(function () {
|
||||
function foo() {
|
||||
var arg = arguments[0]; // no error
|
||||
}
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
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/emitArrowFunctionWhenUsingArguments01_ES6.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/emitArrowFunctionWhenUsingArguments01_ES6.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/emitArrowFunctionWhenUsingArguments01_ES6.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/emitArrowFunctionWhenUsingArguments01_ES6.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) ====
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts (4 errors) ====
|
||||
var a = () => {
|
||||
var arg = arguments[0]; // error
|
||||
~~~~~~~~~
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments.ts]
|
||||
//// [emitArrowFunctionWhenUsingArguments01_ES6.ts]
|
||||
var a = () => {
|
||||
var arg = arguments[0]; // error
|
||||
}
|
||||
@@ -31,7 +31,7 @@ function bar() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments.js]
|
||||
//// [emitArrowFunctionWhenUsingArguments01_ES6.js]
|
||||
var a = () => {
|
||||
var arg = arguments[0]; // error
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.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/emitArrowFunctionWhenUsingArguments02.ts (1 errors) ====
|
||||
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
@@ -0,0 +1,6 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments02.ts]
|
||||
|
||||
var a = () => arguments;
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments02.js]
|
||||
var a = function () { return arguments; };
|
||||
@@ -0,0 +1,8 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.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/emitArrowFunctionWhenUsingArguments02_ES6.ts (1 errors) ====
|
||||
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
@@ -0,0 +1,6 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments02_ES6.ts]
|
||||
|
||||
var a = () => arguments;
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments02_ES6.js]
|
||||
var a = () => arguments;
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts(3,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts (1 errors) ====
|
||||
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments03.ts]
|
||||
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments03.js]
|
||||
var arguments;
|
||||
var a = function () { return arguments; };
|
||||
@@ -0,0 +1,9 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts(3,15): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts (1 errors) ====
|
||||
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
@@ -0,0 +1,8 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments03_ES6.ts]
|
||||
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments03_ES6.js]
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts(4,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments04.ts]
|
||||
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments04.js]
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = function () { return arguments; };
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts(4,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments04_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments04_ES6.js]
|
||||
function f() {
|
||||
var arguments;
|
||||
var a = () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments05.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments05.js]
|
||||
function f(arguments) {
|
||||
var a = function () { return arguments; };
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts(3,19): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments05_ES6.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments05_ES6.js]
|
||||
function f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments06.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments06.js]
|
||||
function f(arguments) {
|
||||
var a = function () { return function () { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments06_ES6.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments06_ES6.js]
|
||||
function f(arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts(3,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = (arguments) => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments07.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = (arguments) => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments07.js]
|
||||
function f(arguments) {
|
||||
var a = function (arguments) { return function () { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts(3,34): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var a = (arguments) => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments07_ES6.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = (arguments) => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments07_ES6.js]
|
||||
function f(arguments) {
|
||||
var a = (arguments) => () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments08.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => (arguments) => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments08.js]
|
||||
function f(arguments) {
|
||||
var a = function () { return function (arguments) { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : (arguments: any) => void
|
||||
>arguments : any
|
||||
|
||||
var a = () => (arguments) => arguments;
|
||||
>a : () => (arguments: any) => any
|
||||
>() => (arguments) => arguments : () => (arguments: any) => any
|
||||
>(arguments) => arguments : (arguments: any) => any
|
||||
>arguments : any
|
||||
>arguments : any
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments08_ES6.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var a = () => (arguments) => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments08_ES6.js]
|
||||
function f(arguments) {
|
||||
var a = () => (arguments) => arguments;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : (arguments: any) => void
|
||||
>arguments : any
|
||||
|
||||
var a = () => (arguments) => arguments;
|
||||
>a : () => (arguments: any) => any
|
||||
>() => (arguments) => arguments : () => (arguments: any) => any
|
||||
>(arguments) => arguments : (arguments: any) => any
|
||||
>arguments : any
|
||||
>arguments : any
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts (1 errors) ====
|
||||
|
||||
function f(_arguments) {
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments09.ts]
|
||||
|
||||
function f(_arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments09.js]
|
||||
function f(_arguments) {
|
||||
var a = function () { return function () { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts(3,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts (1 errors) ====
|
||||
|
||||
function f(_arguments) {
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments09_ES6.ts]
|
||||
|
||||
function f(_arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments09_ES6.js]
|
||||
function f(_arguments) {
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts(4,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments10.ts]
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments10.js]
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = function () { return function () { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts(4,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments10_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments10_ES6.js]
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts(4,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments11.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments11.js]
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = function () { return function () { return arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts(4,25): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts (1 errors) ====
|
||||
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments11_ES6.ts]
|
||||
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments11_ES6.js]
|
||||
function f(arguments) {
|
||||
var _arguments = 10;
|
||||
var a = () => () => arguments;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts(3,7): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts(4,23): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts (2 errors) ====
|
||||
|
||||
class C {
|
||||
f(arguments) {
|
||||
~~~~~~~~~
|
||||
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments12.ts]
|
||||
|
||||
class C {
|
||||
f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments12.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.f = function (arguments) {
|
||||
var a = function () { return arguments; };
|
||||
};
|
||||
return C;
|
||||
})();
|
||||
@@ -0,0 +1,15 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts(3,7): error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts(4,23): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts (2 errors) ====
|
||||
|
||||
class C {
|
||||
f(arguments) {
|
||||
~~~~~~~~~
|
||||
!!! error TS1210: Invalid use of 'arguments'. Class definitions are automatically in strict mode.
|
||||
var a = () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments12_ES6.ts]
|
||||
|
||||
class C {
|
||||
f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments12_ES6.js]
|
||||
class C {
|
||||
f(arguments) {
|
||||
var a = () => arguments;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments13.ts]
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = (arguments) => () => _arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments13.js]
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = function (arguments) { return function () { return _arguments; }; };
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts ===
|
||||
|
||||
function f() {
|
||||
>f : () => void
|
||||
|
||||
var _arguments = 10;
|
||||
>_arguments : number
|
||||
>10 : number
|
||||
|
||||
var a = (arguments) => () => _arguments;
|
||||
>a : (arguments: any) => () => number
|
||||
>(arguments) => () => _arguments : (arguments: any) => () => number
|
||||
>arguments : any
|
||||
>() => _arguments : () => number
|
||||
>_arguments : number
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments13_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = (arguments) => () => _arguments;
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments13_ES6.js]
|
||||
function f() {
|
||||
var _arguments = 10;
|
||||
var a = (arguments) => () => _arguments;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : () => void
|
||||
|
||||
var _arguments = 10;
|
||||
>_arguments : number
|
||||
>10 : number
|
||||
|
||||
var a = (arguments) => () => _arguments;
|
||||
>a : (arguments: any) => () => number
|
||||
>(arguments) => () => _arguments : (arguments: any) => () => number
|
||||
>arguments : any
|
||||
>() => _arguments : () => number
|
||||
>_arguments : number
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments14.ts]
|
||||
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments14.js]
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
var arguments_1 = 100;
|
||||
return function () { return arguments; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
let arguments = 100;
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments14_ES6.ts]
|
||||
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
let arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments14_ES6.js]
|
||||
function f() {
|
||||
if (Math.random()) {
|
||||
let arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts(6,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments15.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments15.js]
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
var arguments_1 = 100;
|
||||
return function () { return arguments; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts(6,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments15_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments15_ES6.js]
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
const arguments = 100;
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments16.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments16.js]
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return function () { return arguments[0]; };
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments16_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments16_ES6.js]
|
||||
function f() {
|
||||
var arguments = "hello";
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var { arguments } = { arguments: "hello" };
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments17.ts]
|
||||
|
||||
function f() {
|
||||
var { arguments } = { arguments: "hello" };
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments17.js]
|
||||
function f() {
|
||||
var arguments = { arguments: "hello" }.arguments;
|
||||
if (Math.random()) {
|
||||
return function () { return arguments[0]; };
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var { arguments } = { arguments: "hello" };
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments17_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var { arguments } = { arguments: "hello" };
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments17_ES6.js]
|
||||
function f() {
|
||||
var { arguments } = { arguments: "hello" };
|
||||
if (Math.random()) {
|
||||
return () => arguments[0];
|
||||
}
|
||||
var arguments = "world";
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var { arguments: args } = { arguments };
|
||||
if (Math.random()) {
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments18.ts]
|
||||
|
||||
function f() {
|
||||
var { arguments: args } = { arguments };
|
||||
if (Math.random()) {
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments18.js]
|
||||
function f() {
|
||||
var args = { arguments: arguments }.arguments;
|
||||
if (Math.random()) {
|
||||
return function () { return arguments; };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts(5,22): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var { arguments: args } = { arguments };
|
||||
if (Math.random()) {
|
||||
return () => arguments;
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments18_ES6.ts]
|
||||
|
||||
function f() {
|
||||
var { arguments: args } = { arguments };
|
||||
if (Math.random()) {
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments18_ES6.js]
|
||||
function f() {
|
||||
var { arguments: args } = { arguments };
|
||||
if (Math.random()) {
|
||||
return () => arguments;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts(6,33): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
|
||||
function foo(x: any) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments19.ts]
|
||||
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
|
||||
function foo(x: any) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments19.js]
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = function () { return arguments; }; // Should trigger an '_arguments' capture into function 'h'
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
function foo(x) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts(6,33): error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
~~~~~~~~~
|
||||
!!! error TS2496: The 'arguments' object cannot be referenced in an arrow function. Consider using a standard function expression.
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
|
||||
function foo(x: any) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
//// [emitArrowFunctionWhenUsingArguments19_ES6.ts]
|
||||
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
|
||||
function foo(x: any) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
||||
//// [emitArrowFunctionWhenUsingArguments19_ES6.js]
|
||||
function f() {
|
||||
function g() {
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
function h() {
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
}
|
||||
}
|
||||
function foo(x) {
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user