* 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
77 lines
1.1 KiB
Plaintext
77 lines
1.1 KiB
Plaintext
=== tests/cases/conformance/expressions/valuesAndReferences/assignments.ts ===
|
|
// In this file:
|
|
// Assign to a module
|
|
// Assign to a class
|
|
// Assign to an enum
|
|
// Assign to a function
|
|
// Assign to a variable
|
|
// Assign to a parameter
|
|
// Assign to an interface
|
|
|
|
module M { }
|
|
>M : any
|
|
|
|
M = null; // Error
|
|
>M = null : null
|
|
>M : any
|
|
>null : null
|
|
|
|
class C { }
|
|
>C : C
|
|
|
|
C = null; // Error
|
|
>C = null : null
|
|
>C : any
|
|
>null : null
|
|
|
|
enum E { A }
|
|
>E : E
|
|
>A : E
|
|
|
|
E = null; // Error
|
|
>E = null : null
|
|
>E : any
|
|
>null : null
|
|
|
|
E.A = null; // OK per spec, Error per implementation (509581)
|
|
>E.A = null : null
|
|
>E.A : any
|
|
>E : typeof E
|
|
>A : any
|
|
>null : null
|
|
|
|
function fn() { }
|
|
>fn : () => void
|
|
|
|
fn = null; // Should be error
|
|
>fn = null : null
|
|
>fn : any
|
|
>null : null
|
|
|
|
var v;
|
|
>v : any
|
|
|
|
v = null; // OK
|
|
>v = null : null
|
|
>v : any
|
|
>null : null
|
|
|
|
function fn2(p) {
|
|
>fn2 : (p: any) => void
|
|
>p : any
|
|
|
|
p = null; // OK
|
|
>p = null : null
|
|
>p : any
|
|
>null : null
|
|
}
|
|
|
|
interface I { }
|
|
>I : I
|
|
|
|
I = null; // Error
|
|
>I = null : null
|
|
>I : any
|
|
>null : null
|
|
|