You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Global T | null | undefined initialised from a T | undefined call: 'ts.Global' op expects region #0 to have 0 or 1 blocks #462
tslang --emit=jit --no-default-lib -mm=gc (rc the same), main 8b9d631:
error: 'ts.Global' op expects region #0 to have 0 or 1 blocks
let g: Node | null | undefined = mkU();
Expected: cls u t7.
If mkU is declared to return Node | null | undefined instead, the program compiles, with a warning casting from optional (undefined) value, and prints 1. So the problem is converting an optional (T | undefined) to the T | null | undefined union inside a global initializer, which apparently produces control flow that a ts.Global region cannot hold. Found by the review of Shared<T> (own phase 8). Shared<T> | null | undefined fails the same way.
Activity