TypeScript/tests/baselines/reference/baseCheck.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

76 lines
2.3 KiB
Plaintext

=== tests/cases/compiler/baseCheck.ts ===
class C { constructor(x: number, y: number) { } }
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
>x : Symbol(x, Decl(baseCheck.ts, 0, 22))
>y : Symbol(y, Decl(baseCheck.ts, 0, 32))
class ELoc extends C {
>ELoc : Symbol(ELoc, Decl(baseCheck.ts, 0, 49))
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
constructor(x: number) {
>x : Symbol(x, Decl(baseCheck.ts, 2, 16))
super(0, x);
>super : Symbol(C, Decl(baseCheck.ts, 0, 0))
>x : Symbol(x, Decl(baseCheck.ts, 2, 16))
}
}
class ELocVar extends C {
>ELocVar : Symbol(ELocVar, Decl(baseCheck.ts, 5, 1))
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
constructor(x: number) {
>x : Symbol(x, Decl(baseCheck.ts, 7, 16))
super(0, loc);
>super : Symbol(C, Decl(baseCheck.ts, 0, 0))
}
m() {
>m : Symbol(ELocVar.m, Decl(baseCheck.ts, 9, 5))
var loc=10;
>loc : Symbol(loc, Decl(baseCheck.ts, 12, 11))
}
}
class D extends C { constructor(public z: number) { super(this.z) } } // too few params
>D : Symbol(D, Decl(baseCheck.ts, 14, 1))
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
>z : Symbol(D.z, Decl(baseCheck.ts, 16, 32))
>super : Symbol(C, Decl(baseCheck.ts, 0, 0))
>this.z : Symbol(D.z, Decl(baseCheck.ts, 16, 32))
>this : Symbol(D, Decl(baseCheck.ts, 14, 1))
>z : Symbol(D.z, Decl(baseCheck.ts, 16, 32))
class E extends C { constructor(public z: number) { super(0, this.z) } }
>E : Symbol(E, Decl(baseCheck.ts, 16, 70))
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
>z : Symbol(E.z, Decl(baseCheck.ts, 17, 32))
>super : Symbol(C, Decl(baseCheck.ts, 0, 0))
>this.z : Symbol(E.z, Decl(baseCheck.ts, 17, 32))
>this : Symbol(E, Decl(baseCheck.ts, 16, 70))
>z : Symbol(E.z, Decl(baseCheck.ts, 17, 32))
class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type
>F : Symbol(F, Decl(baseCheck.ts, 17, 72))
>C : Symbol(C, Decl(baseCheck.ts, 0, 0))
>z : Symbol(F.z, Decl(baseCheck.ts, 18, 32))
>super : Symbol(C, Decl(baseCheck.ts, 0, 0))
>this.z : Symbol(F.z, Decl(baseCheck.ts, 18, 32))
>this : Symbol(F, Decl(baseCheck.ts, 17, 72))
>z : Symbol(F.z, Decl(baseCheck.ts, 18, 32))
function f() {
>f : Symbol(f, Decl(baseCheck.ts, 18, 78))
if (x<10) {
x=11;
}
else {
x=12;
}
}