Skip to content

[TS] Support cast expression #299

Open

Description

@CaelmBleidd

Current state (2026-10-14)

Audited against usvm main at 19866c959d.

TsOptions.eraseTypeAssertions provides JavaScript assertion erasure for consumers that opt in; Calls uses it. The default ETS cast-constraint path remains and still has TODOs for numeric/Boolean and unsupported reference casts.

Remaining acceptance boundary

Complete the remaining default cast semantics or explicitly specify their supported domain. Keep JavaScript assertion erasure distinct from ETS/runtime cast constraints and retain both configuration regressions.

Original report and acceptance context, retained for traceability

We need to add support for cast expression in USVM-TS machine. Seems like the remaining branches should consider only cast from some type to any (creating a fake object) and then cast from this any into a regular type (adding type constraint for the fake object). Otherwise, such situation should be treated as an exception.

Activity

  1. self-assigned this
    on Jul 3, 2025
  2. changed the title [-]Support cast expression in usvm-ts[/-] [+][TS] Support cast expression[/+] on Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions