* 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
65 lines
1.8 KiB
Text
65 lines
1.8 KiB
Text
=== tests/cases/compiler/typeComparisonCaching.ts ===
|
|
// Check that we only cache results of type comparisons that are free of assumptions
|
|
|
|
interface A {
|
|
>A : Symbol(A, Decl(typeComparisonCaching.ts, 0, 0))
|
|
|
|
p: C;
|
|
>p : Symbol(A.p, Decl(typeComparisonCaching.ts, 2, 13))
|
|
>C : Symbol(C, Decl(typeComparisonCaching.ts, 10, 1))
|
|
|
|
s: string;
|
|
>s : Symbol(A.s, Decl(typeComparisonCaching.ts, 3, 9))
|
|
}
|
|
|
|
interface B {
|
|
>B : Symbol(B, Decl(typeComparisonCaching.ts, 5, 1))
|
|
|
|
p: D;
|
|
>p : Symbol(B.p, Decl(typeComparisonCaching.ts, 7, 13))
|
|
>D : Symbol(D, Decl(typeComparisonCaching.ts, 14, 1))
|
|
|
|
s: number;
|
|
>s : Symbol(B.s, Decl(typeComparisonCaching.ts, 8, 9))
|
|
}
|
|
|
|
interface C {
|
|
>C : Symbol(C, Decl(typeComparisonCaching.ts, 10, 1))
|
|
|
|
q: A;
|
|
>q : Symbol(C.q, Decl(typeComparisonCaching.ts, 12, 13))
|
|
>A : Symbol(A, Decl(typeComparisonCaching.ts, 0, 0))
|
|
}
|
|
|
|
interface D {
|
|
>D : Symbol(D, Decl(typeComparisonCaching.ts, 14, 1))
|
|
|
|
q: B;
|
|
>q : Symbol(D.q, Decl(typeComparisonCaching.ts, 16, 13))
|
|
>B : Symbol(B, Decl(typeComparisonCaching.ts, 5, 1))
|
|
}
|
|
|
|
var a: A;
|
|
>a : Symbol(a, Decl(typeComparisonCaching.ts, 20, 3))
|
|
>A : Symbol(A, Decl(typeComparisonCaching.ts, 0, 0))
|
|
|
|
var b: B;
|
|
>b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 3))
|
|
>B : Symbol(B, Decl(typeComparisonCaching.ts, 5, 1))
|
|
|
|
var c: C;
|
|
>c : Symbol(c, Decl(typeComparisonCaching.ts, 22, 3))
|
|
>C : Symbol(C, Decl(typeComparisonCaching.ts, 10, 1))
|
|
|
|
var d: D;
|
|
>d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 3))
|
|
>D : Symbol(D, Decl(typeComparisonCaching.ts, 14, 1))
|
|
|
|
a = b;
|
|
>a : Symbol(a, Decl(typeComparisonCaching.ts, 20, 3))
|
|
>b : Symbol(b, Decl(typeComparisonCaching.ts, 21, 3))
|
|
|
|
c = d; // Should not be allowed
|
|
>c : Symbol(c, Decl(typeComparisonCaching.ts, 22, 3))
|
|
>d : Symbol(d, Decl(typeComparisonCaching.ts, 23, 3))
|
|
|