mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Added symbols files.
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts ===
|
||||
var a = () => {
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 0, 3))
|
||||
|
||||
var arg = arguments[0]; // error
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 1, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
|
||||
var b = function () {
|
||||
>b : Symbol(b, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 4, 3))
|
||||
|
||||
var a = () => {
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 5, 7))
|
||||
|
||||
var arg = arguments[0]; // error
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 6, 11))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
|
||||
function baz() {
|
||||
>baz : Symbol(baz, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 8, 1))
|
||||
|
||||
() => {
|
||||
var arg = arguments[0];
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 12, 5))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
|
||||
function foo(inputFunc: () => void) { }
|
||||
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 14, 1))
|
||||
>inputFunc : Symbol(inputFunc, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 16, 13))
|
||||
|
||||
foo(() => {
|
||||
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 14, 1))
|
||||
|
||||
var arg = arguments[0]; // error
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 18, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
|
||||
});
|
||||
|
||||
function bar() {
|
||||
>bar : Symbol(bar, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 19, 3))
|
||||
|
||||
var arg = arguments[0]; // no error
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 22, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
|
||||
|
||||
() => {
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 26, 7))
|
||||
|
||||
var arg = arguments[0]; // no error
|
||||
>arg : Symbol(arg, Decl(emitArrowFunctionWhenUsingArguments01_ES6.ts, 28, 5))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts ===
|
||||
|
||||
var a = () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments02_ES6.ts, 1, 3))
|
||||
>arguments : Symbol(arguments)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts ===
|
||||
|
||||
var arguments;
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 1, 3))
|
||||
|
||||
var a = () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments03_ES6.ts, 2, 3))
|
||||
>arguments : Symbol(arguments)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 0, 0))
|
||||
|
||||
var arguments;
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 2, 7))
|
||||
|
||||
var a = () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments04_ES6.ts, 3, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 0, 0))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 1, 11))
|
||||
|
||||
var a = () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments05_ES6.ts, 2, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 0, 0))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 1, 11))
|
||||
|
||||
var a = () => () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments06_ES6.ts, 2, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 0, 0))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 1, 11))
|
||||
|
||||
var a = (arguments) => () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 2, 7))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments07_ES6.ts, 2, 13))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts ===
|
||||
|
||||
function f(_arguments) {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments09_ES6.ts, 0, 0))
|
||||
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments09_ES6.ts, 1, 11))
|
||||
|
||||
var a = () => () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments09_ES6.ts, 2, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments10_ES6.ts, 0, 0))
|
||||
|
||||
var _arguments = 10;
|
||||
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments10_ES6.ts, 2, 7))
|
||||
|
||||
var a = () => () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments10_ES6.ts, 3, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts ===
|
||||
|
||||
function f(arguments) {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 0, 0))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 1, 11))
|
||||
|
||||
var _arguments = 10;
|
||||
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 2, 7))
|
||||
|
||||
var a = () => () => arguments;
|
||||
>a : Symbol(a, Decl(emitArrowFunctionWhenUsingArguments11_ES6.ts, 3, 7))
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 0, 0))
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1664, 1))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
let arguments = 100;
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments14_ES6.ts, 3, 11))
|
||||
|
||||
return () => arguments;
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 0, 0))
|
||||
|
||||
var arguments = "hello";
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 2, 7))
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1664, 1))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
const arguments = 100;
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments15_ES6.ts, 4, 13))
|
||||
|
||||
return () => arguments;
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 0, 0))
|
||||
|
||||
var arguments = "hello";
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 2, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 6, 7))
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1664, 1))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
var arguments = "world";
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 2, 7), Decl(emitArrowFunctionWhenUsingArguments16_ES6.ts, 6, 7))
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 0, 0))
|
||||
|
||||
var { arguments } = { arguments: "hello" };
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 2, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 6, 7))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 2, 25))
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1664, 1))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments[0];
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
var arguments = "world";
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 2, 9), Decl(emitArrowFunctionWhenUsingArguments17_ES6.ts, 6, 7))
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments18_ES6.ts, 0, 0))
|
||||
|
||||
var { arguments: args } = { arguments };
|
||||
>args : Symbol(args, Decl(emitArrowFunctionWhenUsingArguments18_ES6.ts, 2, 9))
|
||||
>arguments : Symbol(arguments, Decl(emitArrowFunctionWhenUsingArguments18_ES6.ts, 2, 31))
|
||||
|
||||
if (Math.random()) {
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11), Decl(lib.d.ts, 1664, 1))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
|
||||
return () => arguments;
|
||||
>arguments : Symbol(arguments)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
=== tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts ===
|
||||
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 0, 0))
|
||||
|
||||
function g() {
|
||||
>g : Symbol(g, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 1, 14))
|
||||
|
||||
var _arguments = 10; // No capture in 'g', so no conflict.
|
||||
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 3, 11))
|
||||
|
||||
function h() {
|
||||
>h : Symbol(h, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 3, 28))
|
||||
|
||||
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
||||
>capture : Symbol(capture, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 5, 15))
|
||||
>arguments : Symbol(arguments)
|
||||
|
||||
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
||||
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 8, 5))
|
||||
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 3, 11))
|
||||
}
|
||||
}
|
||||
|
||||
function foo(x: any) {
|
||||
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 8, 5))
|
||||
>x : Symbol(x, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 10, 17))
|
||||
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user