TypeScript/tests/baselines/reference/newWithSpread.symbols
Wesley Wigham 5353475fce Always collect type and symbol baselines (#18621)
* Always generate type & symbol baselines

* Accept changed shadowed baselines

* Accept brand new type and symbol baselines

* Allow `getTypeAtLocation` to return undefined in the type writer

* Accept baselines which had missing type information

* Bind container for dynamically names enum members so they may be printed

* Accept type/symbol baselines for enums with computed members

* First pass at reducing typeWriter memory overhead

* Use generators to allow for type and symbol baselines with no cache

* Accept new baselines for tests whose output was fixed by better newline splitting

* Hard cap on number of declarations printed, cache declaration print text

* handle differing newlines better still to handle RWC newlines

* Lower abridging count, accept abridged baselines

* Limit max RWC error output size, limit RWC type and symbol baseline input size

* Move skip logic into type and symbol baseliner to streamline error handling

* Accept removal of empty baselines

* Canonicalize path earlier to handle odd paths in input files

* Do canonicalization earlier still, also ensure parallel perf profiles for different targets do not trample one another

* No need to pathify again
2017-09-22 15:52:04 -07:00

274 lines
8.8 KiB
Plaintext

=== tests/cases/conformance/expressions/functionCalls/newWithSpread.ts ===
function f(x: number, y: number, ...z: string[]) {
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>x : Symbol(x, Decl(newWithSpread.ts, 0, 11))
>y : Symbol(y, Decl(newWithSpread.ts, 0, 21))
>z : Symbol(z, Decl(newWithSpread.ts, 0, 32))
}
function f2(...x: string[]) {
>f2 : Symbol(f2, Decl(newWithSpread.ts, 1, 1))
>x : Symbol(x, Decl(newWithSpread.ts, 3, 12))
}
interface A {
>A : Symbol(A, Decl(newWithSpread.ts, 4, 1))
f: {
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
new (x: number, y: number, ...z: string[]);
>x : Symbol(x, Decl(newWithSpread.ts, 8, 13))
>y : Symbol(y, Decl(newWithSpread.ts, 8, 23))
>z : Symbol(z, Decl(newWithSpread.ts, 8, 34))
}
}
class B {
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
constructor(x: number, y: number, ...z: string[]) {}
>x : Symbol(x, Decl(newWithSpread.ts, 13, 16))
>y : Symbol(y, Decl(newWithSpread.ts, 13, 26))
>z : Symbol(z, Decl(newWithSpread.ts, 13, 37))
}
interface C {
>C : Symbol(C, Decl(newWithSpread.ts, 14, 1))
"a-b": typeof B;
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
}
interface D {
>D : Symbol(D, Decl(newWithSpread.ts, 18, 1))
1: typeof B;
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
}
var a: string[];
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
var b: A;
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>A : Symbol(A, Decl(newWithSpread.ts, 4, 1))
var c: C;
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>C : Symbol(C, Decl(newWithSpread.ts, 14, 1))
var d: A[];
>d : Symbol(d, Decl(newWithSpread.ts, 27, 3))
>A : Symbol(A, Decl(newWithSpread.ts, 4, 1))
var e: { [key: string]: A };
>e : Symbol(e, Decl(newWithSpread.ts, 28, 3))
>key : Symbol(key, Decl(newWithSpread.ts, 28, 10))
>A : Symbol(A, Decl(newWithSpread.ts, 4, 1))
var g: C[];
>g : Symbol(g, Decl(newWithSpread.ts, 29, 3))
>C : Symbol(C, Decl(newWithSpread.ts, 14, 1))
var h: { [key: string]: C };
>h : Symbol(h, Decl(newWithSpread.ts, 30, 3))
>key : Symbol(key, Decl(newWithSpread.ts, 30, 10))
>C : Symbol(C, Decl(newWithSpread.ts, 14, 1))
var i: C[][];
>i : Symbol(i, Decl(newWithSpread.ts, 31, 3))
>C : Symbol(C, Decl(newWithSpread.ts, 14, 1))
// Basic expression
new f(1, 2, "string");
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
new f(1, 2, ...a);
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new f(1, 2, ...a, "string");
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Multiple spreads arguments
new f2(...a, ...a);
>f2 : Symbol(f2, Decl(newWithSpread.ts, 1, 1))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new f(1 ,2, ...a, ...a);
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Call expression
new f(1, 2, "string")();
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
new f(1, 2, ...a)();
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new f(1, 2, ...a, "string")();
>f : Symbol(f, Decl(newWithSpread.ts, 0, 0))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Property access expression
new b.f(1, 2, "string");
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
new b.f(1, 2, ...a);
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new b.f(1, 2, ...a, "string");
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Parenthesised expression
new (b.f)(1, 2, "string");
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
new (b.f)(1, 2, ...a);
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new (b.f)(1, 2, ...a, "string");
>b.f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>b : Symbol(b, Decl(newWithSpread.ts, 25, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Element access expression
new d[1].f(1, 2, "string");
>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>d : Symbol(d, Decl(newWithSpread.ts, 27, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
new d[1].f(1, 2, ...a);
>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>d : Symbol(d, Decl(newWithSpread.ts, 27, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new d[1].f(1, 2, ...a, "string");
>d[1].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>d : Symbol(d, Decl(newWithSpread.ts, 27, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Element access expression with a punctuated key
new e["a-b"].f(1, 2, "string");
>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>e : Symbol(e, Decl(newWithSpread.ts, 28, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
new e["a-b"].f(1, 2, ...a);
>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>e : Symbol(e, Decl(newWithSpread.ts, 28, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new e["a-b"].f(1, 2, ...a, "string");
>e["a-b"].f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>e : Symbol(e, Decl(newWithSpread.ts, 28, 3))
>f : Symbol(A.f, Decl(newWithSpread.ts, 6, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Basic expression
new B(1, 2, "string");
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
new B(1, 2, ...a);
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new B(1, 2, ...a, "string");
>B : Symbol(B, Decl(newWithSpread.ts, 10, 1))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Property access expression
new c["a-b"](1, 2, "string");
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
new c["a-b"](1, 2, ...a);
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new c["a-b"](1, 2, ...a, "string");
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Parenthesised expression
new (c["a-b"])(1, 2, "string");
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
new (c["a-b"])(1, 2, ...a);
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new (c["a-b"])(1, 2, ...a, "string");
>c : Symbol(c, Decl(newWithSpread.ts, 26, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Element access expression
new g[1]["a-b"](1, 2, "string");
>g : Symbol(g, Decl(newWithSpread.ts, 29, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
new g[1]["a-b"](1, 2, ...a);
>g : Symbol(g, Decl(newWithSpread.ts, 29, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new g[1]["a-b"](1, 2, ...a, "string");
>g : Symbol(g, Decl(newWithSpread.ts, 29, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Element access expression with a punctuated key
new h["a-b"]["a-b"](1, 2, "string");
>h : Symbol(h, Decl(newWithSpread.ts, 30, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
new h["a-b"]["a-b"](1, 2, ...a);
>h : Symbol(h, Decl(newWithSpread.ts, 30, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new h["a-b"]["a-b"](1, 2, ...a, "string");
>h : Symbol(h, Decl(newWithSpread.ts, 30, 3))
>"a-b" : Symbol(C["a-b"], Decl(newWithSpread.ts, 16, 13))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
// Element access expression with a number
new i["a-b"][1](1, 2, "string");
>i : Symbol(i, Decl(newWithSpread.ts, 31, 3))
new i["a-b"][1](1, 2, ...a);
>i : Symbol(i, Decl(newWithSpread.ts, 31, 3))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))
new i["a-b"][1](1, 2, ...a, "string");
>i : Symbol(i, Decl(newWithSpread.ts, 31, 3))
>a : Symbol(a, Decl(newWithSpread.ts, 24, 3))