Skip to content

Type inference fails for generic types #461

@pschachte

Description

@pschachte

For example, this code compiles:

def reverse1(lst:list(T)):list(T) =
    reverse1(lst, [])

def reverse1(lst:list(T),
        rest:list(T)):list(T) =
    if {lst = [?h|?t] ::
            reverse1(t, [h|rest])
       | else         :: rest
    }

but not if the type annotations on the recursive helper function are omitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions