mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
12 lines
414 B
Plaintext
12 lines
414 B
Plaintext
//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/nullAssignedToUndefined.ts] ////
|
|
|
|
=== nullAssignedToUndefined.ts ===
|
|
var x = undefined = null; // error
|
|
>x : Symbol(x, Decl(nullAssignedToUndefined.ts, 0, 3))
|
|
>undefined : Symbol(undefined)
|
|
|
|
var y: typeof undefined = null; // ok, widened
|
|
>y : Symbol(y, Decl(nullAssignedToUndefined.ts, 1, 3))
|
|
>undefined : Symbol(undefined)
|
|
|