Skip to content

Coercion improvements #7507

Open
Open
@zth

Description

@zth

Listing some ideas for improvements to coercion/subtyping.

  • A variant can be coerced to a polyvariant if the polyvariant is closed and the runtime representation matches
  • Investigate dicts - what can be coerced?
  • Handle more coercion + unboxed variants. For example. "hello" :> JSON.t and 1. :> JSON.t works, but not 1 :> JSON.t, true :> JSON.t or dict{"test": "hello"} :> JSON.t

Metadata

Metadata

Assignees

No one assigned

    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