Closed
Description
TypeScript Version: 3.8.0-dev
Code
// Compile with --strict
let a: {};
a;
Expected behavior:
No crash.
Actual behavior:
Crash!
Related Issues:
Crash is caused by code added in #33171. Beyond this crash, I see several issues with that code. For example, it assumes that if the return type is a union type, then the type annotation AST node is a UnionTypeNode
, which by no means is a given. For example, the return type node could be a reference to a type alias.