69 lines
2.4 KiB
Text
69 lines
2.4 KiB
Text
=== tests/cases/conformance/types/primitives/undefined/validUndefinedAssignments.ts ===
|
|
var x: typeof undefined;
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
>undefined : Symbol(undefined)
|
|
|
|
var a: number = x;
|
|
>a : Symbol(a, Decl(validUndefinedAssignments.ts, 2, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
var b: boolean = x;
|
|
>b : Symbol(b, Decl(validUndefinedAssignments.ts, 3, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
var c: string = x;
|
|
>c : Symbol(c, Decl(validUndefinedAssignments.ts, 4, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
var d: void = x;
|
|
>d : Symbol(d, Decl(validUndefinedAssignments.ts, 5, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
var e: typeof undefined = x;
|
|
>e : Symbol(e, Decl(validUndefinedAssignments.ts, 7, 3))
|
|
>undefined : Symbol(undefined)
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
e = x; // should work
|
|
>e : Symbol(e, Decl(validUndefinedAssignments.ts, 7, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
class C { foo: string }
|
|
>C : Symbol(C, Decl(validUndefinedAssignments.ts, 8, 6))
|
|
>foo : Symbol(foo, Decl(validUndefinedAssignments.ts, 10, 9))
|
|
|
|
var f: C;
|
|
>f : Symbol(f, Decl(validUndefinedAssignments.ts, 11, 3))
|
|
>C : Symbol(C, Decl(validUndefinedAssignments.ts, 8, 6))
|
|
|
|
f = x;
|
|
>f : Symbol(f, Decl(validUndefinedAssignments.ts, 11, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
interface I { foo: string }
|
|
>I : Symbol(I, Decl(validUndefinedAssignments.ts, 12, 6))
|
|
>foo : Symbol(foo, Decl(validUndefinedAssignments.ts, 14, 13))
|
|
|
|
var g: I;
|
|
>g : Symbol(g, Decl(validUndefinedAssignments.ts, 15, 3))
|
|
>I : Symbol(I, Decl(validUndefinedAssignments.ts, 12, 6))
|
|
|
|
g = x;
|
|
>g : Symbol(g, Decl(validUndefinedAssignments.ts, 15, 3))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
var h: { f(): void } = x;
|
|
>h : Symbol(h, Decl(validUndefinedAssignments.ts, 18, 3))
|
|
>f : Symbol(f, Decl(validUndefinedAssignments.ts, 18, 8))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
|
|
function i<T>(a: T) {
|
|
>i : Symbol(i, Decl(validUndefinedAssignments.ts, 18, 25))
|
|
>T : Symbol(T, Decl(validUndefinedAssignments.ts, 20, 11))
|
|
>a : Symbol(a, Decl(validUndefinedAssignments.ts, 20, 14))
|
|
>T : Symbol(T, Decl(validUndefinedAssignments.ts, 20, 11))
|
|
|
|
a = x;
|
|
>a : Symbol(a, Decl(validUndefinedAssignments.ts, 20, 14))
|
|
>x : Symbol(x, Decl(validUndefinedAssignments.ts, 0, 3))
|
|
}
|