* 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
132 lines
4.4 KiB
Plaintext
132 lines
4.4 KiB
Plaintext
=== tests/cases/compiler/statics.ts ===
|
|
module M {
|
|
>M : Symbol(M, Decl(statics.ts, 0, 0))
|
|
|
|
export class C {
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
|
|
x: number;
|
|
>x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
|
|
constructor(public c1: number, public c2: number, c3: number) {
|
|
>c1 : Symbol(C.c1, Decl(statics.ts, 3, 20))
|
|
>c2 : Symbol(C.c2, Decl(statics.ts, 3, 38))
|
|
>c3 : Symbol(c3, Decl(statics.ts, 3, 57))
|
|
|
|
this.x = C.y+this.c1+this.c2+c3;
|
|
>this.x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
>C.y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>this.c1 : Symbol(C.c1, Decl(statics.ts, 3, 20))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>c1 : Symbol(C.c1, Decl(statics.ts, 3, 20))
|
|
>this.c2 : Symbol(C.c2, Decl(statics.ts, 3, 38))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>c2 : Symbol(C.c2, Decl(statics.ts, 3, 38))
|
|
>c3 : Symbol(c3, Decl(statics.ts, 3, 57))
|
|
|
|
this.g = (v:number) => C.f(this.x+C.y+v+this.c1+this.c2+C.pub);
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>v : Symbol(v, Decl(statics.ts, 5, 22))
|
|
>C.f : Symbol(C.f, Decl(statics.ts, 10, 24))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>f : Symbol(C.f, Decl(statics.ts, 10, 24))
|
|
>this.x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
>C.y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>v : Symbol(v, Decl(statics.ts, 5, 22))
|
|
>this.c1 : Symbol(C.c1, Decl(statics.ts, 3, 20))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>c1 : Symbol(C.c1, Decl(statics.ts, 3, 20))
|
|
>this.c2 : Symbol(C.c2, Decl(statics.ts, 3, 38))
|
|
>this : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>c2 : Symbol(C.c2, Decl(statics.ts, 3, 38))
|
|
>C.pub : Symbol(C.pub, Decl(statics.ts, 8, 22))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>pub : Symbol(C.pub, Decl(statics.ts, 8, 22))
|
|
}
|
|
|
|
static priv=2;
|
|
>priv : Symbol(C.priv, Decl(statics.ts, 6, 9))
|
|
|
|
static pub=3;
|
|
>pub : Symbol(C.pub, Decl(statics.ts, 8, 22))
|
|
|
|
static y=C.priv;
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C.priv : Symbol(C.priv, Decl(statics.ts, 6, 9))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>priv : Symbol(C.priv, Decl(statics.ts, 6, 9))
|
|
|
|
static f(n:number) {
|
|
>f : Symbol(C.f, Decl(statics.ts, 10, 24))
|
|
>n : Symbol(n, Decl(statics.ts, 11, 17))
|
|
|
|
return "wow: "+(n+C.y+C.pub+C.priv);
|
|
>n : Symbol(n, Decl(statics.ts, 11, 17))
|
|
>C.y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C.pub : Symbol(C.pub, Decl(statics.ts, 8, 22))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>pub : Symbol(C.pub, Decl(statics.ts, 8, 22))
|
|
>C.priv : Symbol(C.priv, Decl(statics.ts, 6, 9))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>priv : Symbol(C.priv, Decl(statics.ts, 6, 9))
|
|
|
|
}
|
|
}
|
|
var c=C.y;
|
|
>c : Symbol(c, Decl(statics.ts, 16, 7))
|
|
>C.y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
|
|
export function f() {
|
|
>f : Symbol(f, Decl(statics.ts, 16, 14))
|
|
|
|
var result="";
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
|
|
result+=(c);
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
>c : Symbol(c, Decl(statics.ts, 16, 7))
|
|
|
|
result+=(new C(0,1,2).x);
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
>new C(0,1,2).x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>x : Symbol(C.x, Decl(statics.ts, 1, 20))
|
|
|
|
result+=(C.f(10));
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
>C.f : Symbol(C.f, Decl(statics.ts, 10, 24))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>f : Symbol(C.f, Decl(statics.ts, 10, 24))
|
|
|
|
result+=(new C(5,10,20).g(C.y));
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>C.y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
>C : Symbol(C, Decl(statics.ts, 0, 10))
|
|
>y : Symbol(C.y, Decl(statics.ts, 9, 21))
|
|
|
|
return result;
|
|
>result : Symbol(result, Decl(statics.ts, 18, 11))
|
|
}
|
|
}
|
|
|
|
M.f();
|
|
>M.f : Symbol(M.f, Decl(statics.ts, 16, 14))
|
|
>M : Symbol(M, Decl(statics.ts, 0, 0))
|
|
>f : Symbol(M.f, Decl(statics.ts, 16, 14))
|
|
|
|
|
|
|