Skip to content

enhancement: inference for generic functions #5524

@crusso

Description

@crusso

At first I was surprised this doesn't work, but I think it's because we never implemented checking for proper generic, untyped lambdas

let c : <T, U>((T, U), (T, U), (T, T) -> Order, (U, U) -> Order) -> Order =
func (p1, p2, cU, cT) {
   switch (cT(p1.0, p2.0)) {
     case (#equal) { cU(p1.1, p2.1) };
     case ord { ord };
   };
};

@kamil is that correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    typingInvolves the type system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions