Skip to content

Infer eqtype as appropriate #3694

@briangmilnes

Description

@briangmilnes

/// Do I get a general type when I use it as an eqtype in inference?
module EqTypeInf

// Works, of course
let aneq (#a:eqtype) (a1 a2: a) = a1 = a2

// Does not infer an eqtype for #a.
[@@expect_failure]
let aneq' #a (a1 a2: a) = a1 = a2
// (Error 19) - Subtyping check failed
// - Expected type eqtype got type Type0
// commit=8b6fce63ca91b16386d8f76e82ea87a3c109a208

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