Skip to content

Empty list annotated dyn becomes polymorphic function #2

@oshimayuki1124

Description

@oshimayuki1124
let x = ([]:?) in 3 :: x;;

x is dyn empty list, but compiler handles it as a polymorphic function because the type for the empty list becomes type variable.

***** Coercion-insertion *****
f: let x = fun 'x10 -> []<['x10!p];[?]!> in 3 :: x[ν]<[?]?p;[int?p;id{int}]>
U: [int]
...
***** Closure *****
Fatal error: exception Not_found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions