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

58 lines
1.4 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 : Symbol(M, Decl(assignments.ts, 0, 0))
M = null; // Error
class C { }
>C : Symbol(C, Decl(assignments.ts, 10, 9))
C = null; // Error
>C : Symbol(C, Decl(assignments.ts, 10, 9))
enum E { A }
>E : Symbol(E, Decl(assignments.ts, 13, 9))
>A : Symbol(E.A, Decl(assignments.ts, 15, 8))
E = null; // Error
>E : Symbol(E, Decl(assignments.ts, 13, 9))
E.A = null; // OK per spec, Error per implementation (509581)
>E.A : Symbol(E.A, Decl(assignments.ts, 15, 8))
>E : Symbol(E, Decl(assignments.ts, 13, 9))
>A : Symbol(E.A, Decl(assignments.ts, 15, 8))
function fn() { }
>fn : Symbol(fn, Decl(assignments.ts, 17, 11))
fn = null; // Should be error
>fn : Symbol(fn, Decl(assignments.ts, 17, 11))
var v;
>v : Symbol(v, Decl(assignments.ts, 22, 3))
v = null; // OK
>v : Symbol(v, Decl(assignments.ts, 22, 3))
function fn2(p) {
>fn2 : Symbol(fn2, Decl(assignments.ts, 23, 9))
>p : Symbol(p, Decl(assignments.ts, 25, 13))
p = null; // OK
>p : Symbol(p, Decl(assignments.ts, 25, 13))
}
interface I { }
>I : Symbol(I, Decl(assignments.ts, 27, 1))
I = null; // Error